Sprites or no Sprites...that is the quesiton

Hi,

I am working on my next game, and have a general "efficiency" question regarding texture memory.

This game will have lots of relatively small graphics (150x150, etc). Is it better to load them in the game (newImageRect) as I need them and destroy them afterwords...or create a sprite sheet and load it once and reference throughout the game?

Seems like loading a dozen 150x150 and them disposing would be better than loading a large sprite sheet (or sheets)...and keeping around...but I am not sure. Maybe load times would be better if the sprite sheets were already loaded...just not sure.

Similarly, I bought Texture Packer, and am planning to change my 1024 background to RGB4444 instead of RGB8888. This reduces the size by 50%...but since the image is the same resolution before and after...isn't the texture memory used going to be the same? If so, is the main reason to reduce image quality simply to make the game/apk smaller?

Any help would be much appreciated.

Thanks!

It really depends on your needs or rather the needs of your app. If you only have a dozen or so small graphics than I don't think it will matter if you use sprite sheets or not. If you are going to have hundreds of graphics (even if they are small) then sprite sheets will be a far more effecient way to manage both images and texture memory. You are correct about reducing file size for images. It doesn't matter whether an image is 10MB or 10KB, if it is 1024x1024 than it will take up the same amount of texture memory either way.

views:1583 update:2011/10/8 8:54:25
corona forums © 2003-2011