Serious game-breaking issues with Graphics 2.0 Migration

To start off, we are running on Corona public build 2013.2076

We have fully completed a proper Graphics 1.0 => Graphics 2.0 migration (we are not using 1.0 compatibility mode) and our game runs smoothly on the Corona simulator.

The problem: When running on an actual device (have tested Galaxy S3, Galaxy Note 2), our game gets slower and slower the more we play. We have a basic world/level system in place, and the more levels we complete in a session, the laggier the game gets. After about 5 levels, it is unplayable.

Notes:

  • This does not occur with Corona public build 2013.1202.
  • This occurs with Corona public build 2013.2076 on Graphics 1.0 Compatibility Mode.
  • We utilize fairly large images throughout our application.

This is a current game-breaker for us, as we require 2076+ which fixes several other iOS7 issues we were previously experiencing with 1202.

Any thoughts?

Thanks

Have you checked your memory allocations?

Thank you for your reply.

Yes, we are monitoring both regular memory and texture memory. They both return to baseline (amount upon entering scene) after destroying the scene. 

We just tried this:

http://forums.coronalabs.com/topic/41407-resolved-graphics-20-bad-performance-image-loading/?p=216086

After applying this workaround, everytime the user transitions to a new level, everything seems to reset and move quickly again. However, if the user spends time within the level moving around for a long time, it starts to slow down drastically. Again, none of this behavior is exhibited prior to 2.0.

Do you have anti-aliasing on in your config.lua?

Rob

No, anti-aliasing is not enabled. I tried enabling it and seeing the same results.

@dionny, are you by any chance using a full size image as the background image? ie: 1024x768, 2048x2048 etc. ?

The background image we are using is 760x1140.

The only reason I ask is because I had a similar issue and it turned out to be the background image (for what reason i have no idea)… 

What I ended up doing was going into photoshop and slicing it into 12 different images and then just created a function that was LoadBackground() and all it did was tile those images to create the background and my performance issues went away.

Not sure if that would resolve your problem but for me it solved it and because I have sub games within games and all with their own backgrounds it reduced my load and build up lag like you are talking about.

But I do know what you are talking about and texMem and Mem look fine but something just churns like (redrawing or something) let my app run over night and by morning you couldn’t even click on anything, switched to tiling background and wham all issues gone!

You will probably need to file a bug report and include your project (well as minimal of a project that shows the performance problem) so we can try and track it down.

Rob

Have you checked your memory allocations?

Thank you for your reply.

Yes, we are monitoring both regular memory and texture memory. They both return to baseline (amount upon entering scene) after destroying the scene. 

We just tried this:

http://forums.coronalabs.com/topic/41407-resolved-graphics-20-bad-performance-image-loading/?p=216086

After applying this workaround, everytime the user transitions to a new level, everything seems to reset and move quickly again. However, if the user spends time within the level moving around for a long time, it starts to slow down drastically. Again, none of this behavior is exhibited prior to 2.0.

Do you have anti-aliasing on in your config.lua?

Rob

No, anti-aliasing is not enabled. I tried enabling it and seeing the same results.

@dionny, are you by any chance using a full size image as the background image? ie: 1024x768, 2048x2048 etc. ?

The background image we are using is 760x1140.

The only reason I ask is because I had a similar issue and it turned out to be the background image (for what reason i have no idea)… 

What I ended up doing was going into photoshop and slicing it into 12 different images and then just created a function that was LoadBackground() and all it did was tile those images to create the background and my performance issues went away.

Not sure if that would resolve your problem but for me it solved it and because I have sub games within games and all with their own backgrounds it reduced my load and build up lag like you are talking about.

But I do know what you are talking about and texMem and Mem look fine but something just churns like (redrawing or something) let my app run over night and by morning you couldn’t even click on anything, switched to tiling background and wham all issues gone!

You will probably need to file a bug report and include your project (well as minimal of a project that shows the performance problem) so we can try and track it down.

Rob

Dionny,

I finally decided to take the plunge into Graphics 2.0 … conversion went smoothly … tedious but smooth.

Then i started testing … all was well till i had played for 40 minutes or so then things started slowing down more and more.

Same game no changes other than the 2.0 required conversions for position and fill color but the performance over time is a non-starter.

Did you ever figure out a solution Dionny?

Reading the threads on this it is not clear to me that adding display.setDefault( “preloadTextures”, true/false )  would have any effect as my issue is not the same as those reporting lags on starting up their game.

Really appreciate any insights.

Cheers,

m

@dionny
you said your checking memory. are you checking during games play or only during scene change?

@mslack can you check your memory usage as well?