I have a problem running my app bundle on iPad1. I know, there could be a problem on old devices, with a big atlases (4096). But I’ve fixed all my atlases, and the game still won’t run. It just opens, and closes the same sec. Can you give me some hint, what could be the problem?
iOS version is 9.3.5.
I’ve checked device log, and yes, it seems like a memory problem ( I get an error “Application ‘UIKitApplication:myappname’ was killed by jetsam.”).
The size of my application bundle is 46 MB.
So, what would you suggest me to try to make it work? Decrease the bundle size, or decrease the atlases size, or smth else?
I would suggest that you start the game on your desktop machine and check the resource tab of the web profiler. You’ll be able to see how much memory the app takes and what’s using the memory.
You should also look into using texture compression to reduce memory usage.
Thanks for the suggestion, I’ll dig deeper into it.
I only tested it on iPhone 6, and it does work. Besides, I did test it earlier in development process on iPad1, and it also worked. Probably, the app resources took much less space back then.
How big are your textures, and how many are they? Depending what they look like, they can compress really well, but when decompressed they take a lot of memory.
Well, I have around 10 atlases 2048x2048, and a bunch of smaller ones, loaded on the start of an app. Some of atlases contain single texture for background, others contain lots of smaller textures. I guess, this is one place to make optimizations - postpone loading of the atlases until they are really needed.
The iPad 1 has 256mb ram in total, which has to be shared with the OS and your app.
Your 10 textures, assuming RGBA will take: (20482048410) / (10241024) = 160mb
And, the engine needs some memory, and you actually have more textures and assets.
So it’s easy to see that you might run into memory problems if all of them are loaded at the same time.
You can both use compression, and perhaps also see if you can load the atlases in/out dynamically?
Thanks a lot, it sure makes sense. I can change to load a bunch of atlases dynamically, and I’ll try to use compression. Thanks again for the insight, it was very helpful.