Showstopper memory issue on iPod touch 4G, drop down to lower resolution assets?

Hello, all. I’ve been working on a eBook project that renders multiple layers of multiple resolution images for the various devices.

I ran into a showstopping issue where the iPod touch 4G (which has only 256MB of RAM) is crashing seemingly because it can’t handle loading multiple fullscreen @2x images. While it never failed on the iPhone 4S, I finally got my app working on the iPhone 4 (which has 512MB of RAM) when the images were initially larger than 960x640 and I cropped it, but it just won’t take on the iPod touch 4G at all.

Is there a way, possibly in the config.lua or build.settings file where I could ignore the @2x images and let it resort to using the lower-resolution 3GS-compatible graphics?

Besides specifically testing for the iPod touch 4G device, has anyone come up with a method of determining the available RAM and use more memory-friendly assets instead?

Please help, as I’m in a real bind and need a resolution (pun intended) quick!

Thanks. [import]uid: 6084 topic_id: 30548 reply_id: 330548[/import]

Hi,
Using the “system.getInfo” API, and the various info it can return, you should be able to force lower-resolution images on the iPodTouch4 versus the iPhone4, despite them having the same screen resolution (which is, of course, what config.lua looks at first).

http://docs.coronalabs.com/api/library/system/getInfo.html

You might even consider “overriding” config.lua and appending the proper suffix in your main code. I’m not sure what the best method is, but armed with the system info, you should be able to solve this memory limitation.

Brent
[import]uid: 9747 topic_id: 30548 reply_id: 122387[/import]

Hi,
Using the “system.getInfo” API, and the various info it can return, you should be able to force lower-resolution images on the iPodTouch4 versus the iPhone4, despite them having the same screen resolution (which is, of course, what config.lua looks at first).

http://docs.coronalabs.com/api/library/system/getInfo.html

You might even consider “overriding” config.lua and appending the proper suffix in your main code. I’m not sure what the best method is, but armed with the system info, you should be able to solve this memory limitation.

Brent
[import]uid: 9747 topic_id: 30548 reply_id: 122387[/import]