How much memory can we use for a game?

I am about 25 to 33% done with a game. Have idea on how to play and art work done just need to do coding and touch up stuff.
In the terminal window the memusage starts at 210.113 and goes up to 408.737.
TexMem is at 4.882432 so is there a number I should keep the game under.

Hi Mike
I think I can help you as I had the relatively same question as you. First off, don't worry about memUsage it's only looking at the LUA code not your actual game the thing that matters most is textMem. The one number you should never exceed or come really close to is 128mb of texture memory because that is all the iPhone 3G can handle.
I think a good beginning number (before re optimizing your code) is 30mb. 15mb is better but it really depends on how many images, sounds, and animations you are using. As you know the lower the better. Here is a link to my question as it might help you save memory.

https://developer.anscamobile.com/forum/2011/08/19/delete-and-recreate-images
Hope that helps!

Oh and is that MB or KB?

Lua memory (reported by gcinfo("count") or garbagecollect("count) is in KBytes.

Corona Texture Memory is in Bytes.

As for memory usage, less is more. 128M is a hard limit for the iPhone and the iPhone 3G, so if you want to target those older devices, then 128M is it. iPad 1 and the iPhone 3GS are 256M devices and the iPhone 4 and iPad 2 are 512M.

So when you're dealing with things that have Megs of memory, a program using a few K's of memory isn't worth worrying about. But you can't be sloppy if you're app is around 1M of Lua memory, you might just be leaking memory.

If you're using a lot of texture memory, there is a good chance that your zipped up app bundle may be over 20MB which is a limit which pushes an app to require WiFi to download.

views:1889 update:2011/10/5 8:48:05
corona forums © 2003-2011