Are there any tricks for RAM efficiency?

chaleychaley Member, PRO Posts: 226
edited November -1 in Working with GS (Mac)
I'm not doing anything particularly tricky or advanced in my game, but the RAM usage is over 60 MEGS. Is there anything specific that can be done to unload unused images or something like that? The only thing I'm spawning is the ball that is shot. There are a fair amount of timers, but without them, I can't do things like change the scene or reset the scene. It's pretty depressing to have a basic game go off the charts with RAM. I had bigger ideas for bigger games, but now I'm beginning to think twice.

Comments

  • bluebyu25bluebyu25 Member Posts: 500
    Gotta ditch those timers man. Even if you have to get really creative with booleans, it has always saved me some RAM. Make sure all actors that dont need to move have moveable unchecked. Ask yourself, can I make the actors that DO move achieve the same movements with interpolate? If so, change them all to that and again uncheck moveable (you can fake movement w/interpolate and still have moveable unchecked). Make sure all images are formatted correctly. Make sure you have all images compressed down as much as you can. I also ditch m4as for .ogg to the same result as well. This can sometimes cause problems if you want to manipulate sound and music separately, but if you dont, this is the way to go.
  • eaorageeaorage Member Posts: 18
    use less actors, and make sure the ones you do use are not movable if you can get away with using interpolate
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Timers, number of actors, complicated Rules without nested conditions, movable vs. non-movable - those all affect FPS, not necessarily the RAM.

    The main culprits for RAM usage are images and sounds.

    Make sure all of your images are 72dpi .png files.

    Understand how your images fit into texture memory in powers of two. If you don't know what I mean, read this post that I made in this thread here: http://gamesalad.com/forums/topic.php?id=13501

    For audio files, unless absolutely critical to your app, I would make them all mono. To play a stereo sound, you are essentially playing two audio files at once.

    The older iOS devices will crash when memory approaches around 40MB of RAM usage. If you want your game to work on the widest number of devices, that is the limit you need to stay under in each Scene.

    Changing Scenes will (supposedly!) clear out RAM in GameSalad. There is currently no other way to flush out the RAM, so be careful how many images and sound effects you spawn into the Scene.
Sign In or Register to comment.