Hi,
I've been trying to create a game with Gideros for more than a month. It's almost done now, but I realised that the textures of the game account for more than 400 Mo of memory. Unfortunately, there is not that much memory available on the iPhone.
How can I optimize the memory?
Regards,
Beunn
Comments
At the beginning I used the sceneManager from a GameTemplate found on the forum but I needed to modify it for init some views because of lag between scenes.
My game works on iPad 4 and iPhone 5 but for other devices it crashes with memory warning
Most probably you overcome this lag by loading all assets globally, which in result you have too much memory consumed.
If this is the case, well I'de say there is no better alternative then divide assets between scenes and unload them when exiting scene.
I don't understand how memory works. On my project I comment all the init and I only print the collectgarbage("count") and it shows me 431.6865234375 : Why ?? It seems weird if nothing is loaded...
http://docs.giderosmobile.com/reference/gideros/Application/getTextureMemoryUsage
How big graphics do you use (resolution wise)?
For instance, all graphics are for iPad retina and rescale for other resolutions. But I know I need to make the graphics for old devices. But when I erase all the graphics with a resolution of 1536 x 2048, just for displaying all the other sprite who are under 1024 px , the app crashes.
And why when I'm profiling my app on Xcode, I've got 530Mb of memory allocations?
And yes using smaller graphics would be preferable and use Automatic Image Resolution, so Gideros would choose the best resolution to use automatically.