Timing the Corona screen draw?

Hi

I have a game that runs comfortably at 60fps on most devices (Galaxy S2, S4, etc.) but struggles to get over 30fps on a Galaxy tab 10.1.  I don’t have another tablet to test so I don’t know if this is just on this tablet or in general.  The tablet runs a Tegra processor.

As an overview, for my background I have 10,000 tiles (100x100px @2x) in a display group that is split into 10x10 quadrants with isVisible toggled for quadrants not currently within the display bounds.  The display is 640 x 960  - trying lower screen resolutions (480 x 720) and scaling up didn’t seem to make much difference.  I tried loading the background as a 5000x5000px single jpg and that made no difference to the fps either.  So I wonder if the issue is simply moving a large display group?  I have the camera fixed on the player so that is always the centre of the screen and the display groups are translated accordingly.

Obviously there are many ways to cull/optimize - smaller quadrants but mode show/hide code loops.  My question is…  Is there anyway to know how long Corona is taking on the screen draw cycle so I can optimise code run time versus screen redraw time to find a happy medium for all devices?  Or can you suggest a more efficient method of achieving my goal?

Thanks

Adrian

Game is now published but performance on some android devices is shocking!  New galaxy fame (1ghz) crawls at under 10 fps?

There is no physics involved. Any input on this Corona staff?

What version of Corona SDK are you using?

Does it still run fine on newer devices?

What is the name of the App?

Hi Rob,

I am running 2100.  I get 60fps on galaxy s2, s3 and s4 but on fame and tab I get 10fps and 35-40fps respectively. 

It is available here https://play.google.com/store/apps/details?id=com.spheregamestudios.rolyball.

You’ll see from the screen shots how many objects are being redrawn when the screen scrolls.  I wouldn’t say that was a lot of objects to translate (compared to say a low end 3D game?   The display group is 5000px x 5000px but I get the same fps drawing 100px x 100px tiles (from a grid) as a single jpg.  So I assume the issue is the size of the display group?

I am changing the display group x and y on my enter frame event to provide the animation.

Thanks

Adrian

Quick update.  I’ve optomised my code in enterframe and I’ve timed this at <3ms for Galaxy S2 and <5ms for Galaxy Fame.  I get a solid 60fps on Galaxy S2 (before and after optimisations) but still around 10fps on Galaxy Fame.

That implies the S2 is drawing to screen in under 13ms but the Fame is averaging at least 85ms to draw the screen!  The S2 has a dual core 1.2Ghz and the Fame a single core 1Ghz which would explain the execution difference in enterframe but not the massive difference in draw time?  Would the GPU make that much difference?

Yes, the GPU is realistically more important in this case than the CPU since we do the drawing with OpenGL and most of that executes on the GPU.

Game is now published but performance on some android devices is shocking!  New galaxy fame (1ghz) crawls at under 10 fps?

There is no physics involved. Any input on this Corona staff?

What version of Corona SDK are you using?

Does it still run fine on newer devices?

What is the name of the App?

Hi Rob,

I am running 2100.  I get 60fps on galaxy s2, s3 and s4 but on fame and tab I get 10fps and 35-40fps respectively. 

It is available here https://play.google.com/store/apps/details?id=com.spheregamestudios.rolyball.

You’ll see from the screen shots how many objects are being redrawn when the screen scrolls.  I wouldn’t say that was a lot of objects to translate (compared to say a low end 3D game?   The display group is 5000px x 5000px but I get the same fps drawing 100px x 100px tiles (from a grid) as a single jpg.  So I assume the issue is the size of the display group?

I am changing the display group x and y on my enter frame event to provide the animation.

Thanks

Adrian

Quick update.  I’ve optomised my code in enterframe and I’ve timed this at <3ms for Galaxy S2 and <5ms for Galaxy Fame.  I get a solid 60fps on Galaxy S2 (before and after optimisations) but still around 10fps on Galaxy Fame.

That implies the S2 is drawing to screen in under 13ms but the Fame is averaging at least 85ms to draw the screen!  The S2 has a dual core 1.2Ghz and the Fame a single core 1Ghz which would explain the execution difference in enterframe but not the massive difference in draw time?  Would the GPU make that much difference?

Yes, the GPU is realistically more important in this case than the CPU since we do the drawing with OpenGL and most of that executes on the GPU.