I’m using Tiled to cut up my large images to save memory, but it uses the same amount? My image is 1986 x 1562 pixels in PNG format and that uses up 31MB of memory during gameplay. When I use a tilemap it is 180 x 120 tiles in TMX format and uses 31MB. Am I just doing something wrong? I put the TMX file in my project along with the PNG file.
I don’t understand. I will have about 10 images that size in my application. What should I do?
First, any iPhone older than 3GS has a max texture size of 1024×1024. Your game will crash on older devices. Second, OpenGL rounds up the texture size to the nearest power of two when creating textures. Your 1986×1562 textures are actually 2048×2048, which is 4 megs a pop.
That your app uses 31 megs after loading one texture is likely due to other factors. Unless you come back with a blank project that just loads one of those monstrous textures and still you’ve got 31 megs, I say it’s something else.
What you should do is logically group your textures into multiple images of 1024×1024. And use Xcode’s profiling tools to determine where the memory is going.