Hello
Is there any memory limit for the app on the device? Currently I’m facing following problem. In my APK there are several pictures with resulution 1024*768 and some smaller ones. On game start I’m loading all my graphics and facing following problem: application doesnt start on device. I’ve updated the code to cut some graphics and after that app was loading ok. After I’m adding some more graphics to load it stops working. My APK file has about 7Mbytes and I’ve have about 3Mb of graphucs there. Can this problem can be caused by Out of Memory issue or something like this? [import]uid: 31161 topic_id: 10893 reply_id: 310893[/import]
How many 1024x768 images are you loading? When an image is loaded in Corona it is loaded as an uncompressed bitmap and the resolution is rounded up to the next power of two. So a 1024x768 image (no matter the quality or file size) will be loaded as a 32bit(4 bytes) 1024x1024 bitmap. Each one of those images is taking up approximately 4MB of memory (1024 x 1024 x 4 = 4194304 bytes) so it would only take a few of those to run out of memory. [import]uid: 27965 topic_id: 10893 reply_id: 39615[/import]
Depending on the device : it is between 20MB-40MB of texture memory before you start running of memory.
*notice i said texture memory as we use the opengl rendering engine
i would advice to load images on demand
C. [import]uid: 24 topic_id: 10893 reply_id: 39654[/import]
Depending on the device : it is between 20MB-40MB of texture memory before you start running of memory.
*notice i said texture memory as we use the opengl rendering engine
i would advice to load images on demand
C. [import]uid: 24 topic_id: 10893 reply_id: 39655[/import]
Hi guys
Thank you for responds.
To calebr2048: I’ve got 6 images with 1024*768 resolution and 12 with 200*768 and also a bunch of small ones.
To carlos m. icaza: yes, I’ve solved this issue in the same way - all big images are loading upon request and released after they are not needed anymore.
[import]uid: 31161 topic_id: 10893 reply_id: 39740[/import]