Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Images and RAM

OperationVideoGameOperationVideoGame Posts: 5Member
edited January 2012 in Tech Support
My entire images folder on my computer for this game is 1.7 MB, but in the GameSalad Viewer they are getting up to 70 MB? This is doing extreme damage to my overall RAM Usage and making my game perform slowly. Any reason why the images are so large?


  • firemaplegamesfiremaplegames Posts: 3,206Member
    RAM usage is not the same thing as file size.
    Every image that you add to a Scene will increase the RAM usage.

    GameSalad loads everything in as 32-bit textures.

    Which allows 8 bits for red, 8 for green, and 8 for blue. as well as 8 bits for an alpha channel. that is PER PIXEL.

    The basic formula to figure out the RAM is to multiply the number of pixels in an image by 3.

    So if your image is 512x512 pixels, the math would be:

    512 x 512 x 3 = 786432 bytes = 786Kb

    So a 512x512 image will basically use 786Kb of RAM in your game. And if you add another one of those images to the Scene, it will double.
    It has nothing to do with the file size of the image.

    Apple has different algorithms to reduce RAM usage a bit, but that is a pretty safe estimate.
  • ultimaultima Posts: 1,207Member, PRO
    i know you are pretty well versed in performance optimization fire maple, would you care to enlighten us with a few other little tricks of your of optimizing in GS? for examples, behaviors to use over others, or ways of doing things that's more optimal than the usual route... if you have the time that is .
  • Awesome! Thanks for the help. I will start shrinking down my image sizes as well.
This discussion has been closed.