big RAM memory usage problem
by Gustavo Boni · in Torque Game Builder · 02/19/2009 (4:17 am) · 1 replies
I'm developing a game that will have a lot of characters. They all have about 4 different animations.
The thing is that they need to have a big resolution, 'couse we want the game to be in HD definition.
All animations are spritesheets with 15 frames. Each spritesheet is about 1000x600. but all the animations have 8 different perspectives.
So, for each character, you have 8*4 = 32 1000x600 spritesheets.
With rough calculations, each sprite ocuppies 5mb in RAM. each character will take 160mb in RAM. If I wanted to use about 7 characters, that will be more than a gigabyte.
Don't forget I also have a lot of other assets.
So, what can I do to save some RAM memory? Unfortunatly, lowering the spritesheet resolution is not negociable.
I saw a technich to use jpg with alpha, using a separated greyscale jpg. I didn't get that to work, but i was wondering if it would save me some RAM.
Any thoughts on how to save memory?
Can I make a dinamically script-based manager that only keeps in memory whats beeing rendered?
Thanks!
The thing is that they need to have a big resolution, 'couse we want the game to be in HD definition.
All animations are spritesheets with 15 frames. Each spritesheet is about 1000x600. but all the animations have 8 different perspectives.
So, for each character, you have 8*4 = 32 1000x600 spritesheets.
With rough calculations, each sprite ocuppies 5mb in RAM. each character will take 160mb in RAM. If I wanted to use about 7 characters, that will be more than a gigabyte.
Don't forget I also have a lot of other assets.
So, what can I do to save some RAM memory? Unfortunatly, lowering the spritesheet resolution is not negociable.
I saw a technich to use jpg with alpha, using a separated greyscale jpg. I didn't get that to work, but i was wondering if it would save me some RAM.
Any thoughts on how to save memory?
Can I make a dinamically script-based manager that only keeps in memory whats beeing rendered?
Thanks!
About the author
Torque Owner Alexander de Hartdegen
Default Studio Name
However, i dun think it is the best way to do it so i am constantly searching for a better solution, even until now. The "preload" and "allow unload" options for image maps look promising but i have yet to try it too, as it is difficult to decide which image maps should be preloaded and which should be unloaded when they are not in use. I hope anyone will have a better solution.