Image dimension in Memory Usage

quimququimqu Member Posts: 22
edited November -1 in Working with GS (Mac)
Hello everyone,

please someone help me. I have a game with 18 actorss that work as scroll images. These images are fallin from top to bottom. They are 640x980 pixes(I leave 10 pixels for overlapping to each other). The images that I use for each actor are no bigger than 200Kb, so I have about 3,5Mb of total images.

I have tested the game on Gamesalad Viewer and my surprise was that the Image Memory Usage was abou 75Mb!!! I deleted all other actors and I still have 73Mb of Image Memory Usage. Only when I delete the 18 images of these 18 actors I have about 6Mb of Image Usage. How could this be? How could 3,5Mb in images become 70Mb???

I work with resolution Independence. When I stop working with that, I still have the 75Mb of Image Memory Usage.

Any idea of what is happening?

Thank you!

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    the memory usage for images is based on the physical dimensions of the image. There are steps and they are powers of 2. Meaning the amount of memory is determined by which step the image dimension is in between
    the numbers are 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024

    So your image at 640x980 uses the same amount of memory as an image that is 1024x1024

    you unfortunately with having 18 images that size you will be hard pressed to save any memory for sure. Is their any way you can reduce the number and just reuse the same image several times?

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    Menu #4 - Level Banners HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • quimququimqu Member Posts: 22
    So, if I understood, if I need an image to be scrollable on iPhone 4 and that it covers all the screen, it must be 1024x1024 pixels. As the screen is 640x960, the only format that cover all of this is 1024x1024. If I use 512x1024, there will be 128 pixels not covered.

    Thaks for your reply.

    I will try to think of a solution for my game. Not easy, but I'll try to find it.

    Thanks again!
Sign In or Register to comment.