I was wondering if there is a rule of thumb to estimate the raugh runtime memory usage.
That's my current "mental algorithm":
- sprite frame sheets: e.g. 2048*2048= approx 4MB runtime (I have 1 sheet for HUD and Input sprites, 1 for player characters and bullets, 1 for enemies, 1 for background for a total of 16 MB)
- mp3 background track: size of track, e.g. 4 MB for a 192kbps 3 minutes song Does this actually expand into caf and become bigger?
- caf files: size of caf file (I have about 15 caf files of about 300KB each so sum would be 4.5 MB)
- I tend to ignore the number of CCSprite subclasses that I allocate but for instance I could multiply each sprite for the average size of my CCSprite subclasses (e.g. .m file 45 KB = 41.270 byte and .h file 4KB for a total of 49KB avarage):
if I use BulletCache with 200 bullets and an EnemyCache with 50
sprite plus approximately 100 other CCSprite subclasses (HUD,
buttons, player sprites) the simplified sum could be 350. So we have 350 * 49KB = 17.150 KB which is raughly 17 MB.
So a total of 17 + 4.5 + 16 + 4 = 41.5 MB runtime memory usage
Would this be a reasonable enough way to estimate?