Hey there.
So we’re working on a 2D Game with 2DToolkit for the iOS Plattform (targeting devices starting at the iPhone 3GS upward and the whole iPad-Family) and I’m wondering about a crucial thing: Memory. I’ve got “only” two devices to test the game: an iPhone4 and an iPad mini.
2DToolkit has a nice TextureAtlas-System which reduces the DrawCalls, which is great. Now the game runs on both devices smoothly with 60FPS with around 6 max 12 DrawCalls (nGUI Userinterface and some other stuff besides the Sprites…animations, Particles etc.) and over 100 Sprites which is great. It didn’t came to my mind till a friend of mine told me: “Yeah, that’s nice, indeed. But what about the memory?” And I asked myself: “Yeah, man, what about the memory!?”
So I started the Game in Unity and looked up the Editor-Log:
65MB just for textures. I don’t think that is a good sign. But the thing is, if I configure the settings of the Atlas-Textures (for example using the PVRCT Compression) the Sprites look horrible on the device. I already changed the Size/Format of the Textures down to the point where they look acceptable.
Then I wanted to know what XCode has to say. I profiled it with the Activity Monitor (The Game is the red one!):
As I progress through the first scene the game goes up to 96,79 MB and stays that way.
I didn’t receive any Memory-Warnings. Not on the iPhone 4, and not on the iPad Mini.
Now I would like to know: Is this bad? Is this way too much Memory-Usage for the targeted iOS-Devices?
I know what would be the solution: “Smaller Textures!” ← yeah! I would suggest so, too. But smaller = uglier. Is there a better compromise or another way than PVRCT Compression?