Memory Size much more higher than Project Size

minimaxminimax Member Posts: 24
edited December 2011 in Working with GS (Mac)
Hello everybody,

I´ve a problem with my game-project. Everytime I´ll started the game in viewer the memory-size is 50MB. The project-size is only 3,8MB. The result: The game-flow in the viewer is not really smooth and some images was not shown. Is it possible to reduce the memory-size by using the same project-size (3,8MB)? Or are there other options to check-out the game-flow in viewer without handicaps?

Another question: Is the project-size the same like the app-size?

Thanks,
Max

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    edited December 2011
    The Ram usage has nothing to do with File size. Its based on the actual files. For example the large the image dimensions the larger the ram used for each image. images are normally where people have the biggest troubles with ram. Something to make sure of is that your actual images are no larger than they need to be. if your actor is 100x100 for example your image doesn't need to be any larger than 200x200 if you are using RI. but if you load 512x512 image in you are using more ram than needed. Because even though the actor is 100x100 your game is loading the 512x512 image which most likely is using almost 1MB of ram on its own. If you have a lot of animations this will obviously cause your Ram to get high really fast.

    Something else that is really hard for some people is how the ram is handled. The device sets the ram usage for each image based on the powers of 2 2,4,8,16,32,64,128,256,512,1024

    So if your image is 200x200 its using the ram of a 256x256 image. you can either take advantage of the extra space and make you image 256x256 or if you need to save some ram drop the image size to 128x128. It doesn't have to be the same size in both dimensions either. For example 100x200 image will use the ram of a 128x256 image.

    I hope that helps its one of the harder things to explain for me. I'll see if I can find a post by wayne who explained it really well one time.

    Another thing you can do to help with your ram is to deselect preload art on your actors. This will keep it from loading every image at once but will still load them when they are needed.

    cheers
    Aaron

    @tenrdrmer
  • minimaxminimax Member Posts: 24
    Hi tshirtbooth,

    the image-ram is 37MB.
  • minimaxminimax Member Posts: 24
    Hello tenrdrmer,

    I´ve also think about to deselct preload art....but I dont know how to do it? Is there a way to tell the gs creator "put now the image out of the memory"?
  • minimaxminimax Member Posts: 24
    Hi Aaron,

    now I know more about the preload art. Its a new option in GS 0.98. For this project I was working with 0.97 (without preload-option).
    ´hope this fixed my problem! I will test it!
Sign In or Register to comment.