Memory Usage, App size, Resolution questions

Hi all,

In my current project so far, my biggest and most massive map has the following memory usage reported on average: 

MEMORY = 1972.510 KB TEXTURE = 81.74324798584 MEMORY = 2017.846 KB TEXTURE = 81.74324798584 MEMORY = 2064.834 KB TEXTURE = 81.742874145508 MEMORY = 2123.420 KB TEXTURE = 81.73006439209 MEMORY = 2170.521 KB TEXTURE = 81.73006439209 MEMORY = 2150.377 KB TEXTURE = 81.73006439209 MEMORY = 2095.697 KB TEXTURE = 81.730438232422 MEMORY = 2052.014 KB TEXTURE = 81.730438232422 MEMORY = 2032.885 KB TEXTURE = 81.728942871094 MEMORY = 2050.471 KB TEXTURE = 81.729690551758 MEMORY = 2072.471 KB TEXTURE = 81.714363098145 MEMORY = 2097.529 KB TEXTURE = 81.728942871094 MEMORY = 2082.494 KB TEXTURE = 81.729316711426

That info is generated with the following code:

local function checkMemory() collectgarbage( "collect" ) local memUsage\_str = string.format( "MEMORY = %.3f KB", collectgarbage( "count" ) ) print( memUsage\_str, "TEXTURE = "..(system.getInfo("textureMemoryUsed") / (1024 \* 1024) ) ) end local memTimer = timer.performWithDelay( 1000, checkMemory, 0 )

Do you guys think it is still within “normal” range?   

With about 8 levels at this point,  the APK size is now around ~39-40MB.   But I am and will be reusing most of the assets for the rest of the levels, so I would guess the next increments may taper down to smaller amounts? 

For favoring eye candy and realistic visual effects, I bit the bullet on this one and decided on a content resolution of 1080 x 1920 with 60fps.  Yes I know, I could have just settled on a smaller resolution and just use assets with @2x, @3x to adapt to high-res devices, etc.  Considering most of today’s devices are sporting very high resolutions and processing power with heaps of RAM, I settled into this setting which I consider to be a sweet spot between older and newer (future) devices.  I have been testing the app on numerous not-so-old Android devices and I am very pleased with the results so far.  It runs like butter :slight_smile:

Now, my concern came about when I managed to get my hands on a much older device, a Samsung Tab running Android 4.2, 1GB RAM and a 1.2gHz processor (SM-T110).  The performance is not so satisfying to  say the least - slow and choppy.  How many % users do you think today still use devices with those specs? 

I welcome your thoughts on this.

Thanks,

Santi

did you get an answer to this?   Seems like if it has 2 GB of ram and you are only using 2 meg you should be fine.  I am running about 4 meg of memory and 200 MB of texture and things are smooth at first but then start to slow down as the player plays the level for a while.  I am not sure what causes that and would like to know what you found out. 

Hello

About MEMORY part - it’s normal, even low. Textures - 82Mb video memery is also  fine.

Performance depends on different factors, not only memory - do you preload your textures or load all during game process? Do you have complex calculations in onFrame listener?

Hi,

Thanks for your feedbacks.

I am about the 18th level now on the project. Development is slow as we have a “life” to live out there :D 

@Benzeliden, Yes I preload my textures at game start.  I guess the performance hit is more on the massive math calculations per frame, and yes, I do have comlpex calculations on enterFrames.   So for some of visual effects that has complex calculations, I tried to “half” the updates to 30fps (alternate frames.  My game config is 60fps).  It didn’t make much difference on visual effects quality but it did help a bit to improve speed/smoothness in older devices.

@laurasweet8888, you could probably have memory leaks.  Happened a lot to me before.   Game starts smooth but after about 2-3minutes of gameplay, it slows down until it is barely unplayable.   

I have to agree 82mb of Texture memory is pretty low these days, though older devices may have trouble with it.  Even though a device may say you have 1GB of RAM, your app doesn’t get all of that.  Also if your device has to downsize the images to fit its physical size (1080x1920 squeezed down to an iPhone 4’s 640x960 for instance) it takes CPU and GPU power to do that resample which will also impact performance.

How widespread is this? If you want your app to run worldwide, there are many countries where older/less powered Android devices are more common than fast ones. But only you can decide how important those target audiences are to your overall marketing plan.

Rob

did you get an answer to this?   Seems like if it has 2 GB of ram and you are only using 2 meg you should be fine.  I am running about 4 meg of memory and 200 MB of texture and things are smooth at first but then start to slow down as the player plays the level for a while.  I am not sure what causes that and would like to know what you found out. 

Hello

About MEMORY part - it’s normal, even low. Textures - 82Mb video memery is also  fine.

Performance depends on different factors, not only memory - do you preload your textures or load all during game process? Do you have complex calculations in onFrame listener?

Hi,

Thanks for your feedbacks.

I am about the 18th level now on the project. Development is slow as we have a “life” to live out there :D 

@Benzeliden, Yes I preload my textures at game start.  I guess the performance hit is more on the massive math calculations per frame, and yes, I do have comlpex calculations on enterFrames.   So for some of visual effects that has complex calculations, I tried to “half” the updates to 30fps (alternate frames.  My game config is 60fps).  It didn’t make much difference on visual effects quality but it did help a bit to improve speed/smoothness in older devices.

@laurasweet8888, you could probably have memory leaks.  Happened a lot to me before.   Game starts smooth but after about 2-3minutes of gameplay, it slows down until it is barely unplayable.   

I have to agree 82mb of Texture memory is pretty low these days, though older devices may have trouble with it.  Even though a device may say you have 1GB of RAM, your app doesn’t get all of that.  Also if your device has to downsize the images to fit its physical size (1080x1920 squeezed down to an iPhone 4’s 640x960 for instance) it takes CPU and GPU power to do that resample which will also impact performance.

How widespread is this? If you want your app to run worldwide, there are many countries where older/less powered Android devices are more common than fast ones. But only you can decide how important those target audiences are to your overall marketing plan.

Rob