RAM memory constraints..

Hey there folks..
I've been working on a project for quite a while now.
When i preview the game on my phone.. the memory usage starts off from 60mb and goes upto 150.
Is that good or how..
Please suggest.
I've been working on a project for quite a while now.
When i preview the game on my phone.. the memory usage starts off from 60mb and goes upto 150.
Is that good or how..
Please suggest.
Comments
As for iPhone 4 and 4s , i don't think the app will crash .
But still 150mb seems a bit too much , is it mostly from images ?
To reduce the number of actors.. i spawn them when required and destroy them when done..
To ask...
* Could it be cos that m spawning 8-10 actors every action?
* Could it be for the magnitude of actors in the scene?
Instead of spawning an actor and then destroying it once it have done it's thing . . .
Keep the actors (that you would normally spawn) offscreen so they cannot be seen. When you need one, instead of spawning it simply change it's position from it's offscreen position to where it should be (with change attribute) - then when you want it 'destroyed' simply move it back to it's offscreen holding position.
I have put a set of 40 actors in my scene.. I am changing their image (from null to required) only when they are supposed to be visible..
This action.. when i test it on my phone.. results in total memory size of 60 mb.. M not spawning anything now..
The total size of my project is 2mb..
Now i added 5 images worth 40kb.. and added them to animate the actor.. when it is rendered..
The total memory size .. while testing on the 4s.. jumped to 62.5mb..
I am now required to animate all of those actors... Which by calculation will pump up the size to more than a 100mb..
Needless to suggest .. that i am still working on the framework.. and the game will crash.. be it on any device.
Can anyone help me out here? Plz.
Thanks @Tynan .. i've found a way out and m starting from scratch with a different approach..
Can some1 help me on this? Am not a coding pro.. Are these sort of programming basics.. or are they a part of GS basics?
I like to use changeAttribute: self.image instead of animate in some scenarios …
your work sounds so dynamic and exciting with the visual effects you are striving for!
@};- MH
Try unchecking the "movable" box on actors that don't need to move..
Though m still away from what i desire..i'll keep goin on..
Thanks @LeonardDeveloper @MotherHoose @calvin9403
If you can squeeze even one side of the dimensions into a smaller container it will lower the ram used.
@tenrdrmer considering that.... my light bulb just lit up.. just that i'll require a tidy bit more of effort to save RAM..still <:-P