Saving Texture Memory

Hi,

I’ve seen a lot of games combining multiple images in the same file to save memory. Corona allows us to do that by using the Sprite API. But what if I use sprites for non-sprite objects? I mean, I want to combine unrelated images in a single file and load specific portions of this big file when needed. So, instead of using images (newImageRect), my game would have 1-frame sprite instances. Would that be ok or overkill?

Thanks in advance! [import]uid: 96891 topic_id: 18526 reply_id: 318526[/import]

interesting question, i’d like to know as well [import]uid: 16142 topic_id: 18526 reply_id: 71065[/import]

Interesting! Commenting to get notified! :slight_smile:
[import]uid: 64174 topic_id: 18526 reply_id: 71141[/import]

We use this method and it works great. Texture memory is much lower. We don’t try to pack everything I to one sheet but rather group our sheets based on what’s needed for a particular screen. For example all our main menu objects would be on one sheet, then the level menu objects on another, etc [import]uid: 40137 topic_id: 18526 reply_id: 71144[/import]

Of course you can use 1-frame sprites like normal images. And i can even courage you to do so. It’s gona save lot’s of memory. We use same principal that mmathias6410 said: own spritesheet for each basic module of game. one for menu, one for levels ans so on…

We also created own “button module” that helps creating menu buttons with several different states from sprites. Works like charm. [import]uid: 105307 topic_id: 18526 reply_id: 71148[/import]

wow, i think i need to display my images from spritesheets from now on

thanks for advice [import]uid: 16142 topic_id: 18526 reply_id: 71150[/import]

What about game performance though? Doesn’t the game get slower or anything when you use too many “sprites” as opposed to “images” ? [import]uid: 64174 topic_id: 18526 reply_id: 71153[/import]

No it doesn’t get slower because of sprites. [import]uid: 40137 topic_id: 18526 reply_id: 71167[/import]

@Satheesh in my opinion preformance is even better :slight_smile: [import]uid: 12704 topic_id: 18526 reply_id: 71245[/import]

This is awesome! Will try this method in my next game!
Thanks all! :slight_smile: [import]uid: 64174 topic_id: 18526 reply_id: 71246[/import]

Thanks a lot. This is extremely valuable! [import]uid: 96891 topic_id: 18526 reply_id: 71555[/import]

Satheesh wrote:

Interesting! Commenting to get notified! :slight_smile:

reply to get notified :wink:
no - just click on “Subscribe” link.

Sorry for OT comment…

I’m interested to get more EXP from others about this use of sprites! [import]uid: 70114 topic_id: 18526 reply_id: 71560[/import]

  • 1 for info from pros :
    you use spritegrabber? what s you solution for hires management?

thx [import]uid: 9328 topic_id: 18526 reply_id: 71562[/import]