Performance issues on mobile

0 favourites
  • 14 posts
From the Asset Store
a ready made template of Mobile Advert, Google Play and Mobile IAP Plugin,
  • Hi,

    So my game used to have a very poor performance while previewing on a mobile device, but I have made some 'radical changes' (like making images way smaller, making events more efficient, followed this https://www.scirra.com/manual/134/performance-tips) and it had a nice result. But it is still not enough.

    The objects using CustomMovement sometimes move in a slow-motion. My min FPS is 30, but the FPS never drops below 30 when moving (the fps drops when the object is triggered to move).

    I have also no effects, no objects that move all the time, no animations that keep replaying (i have a maximum of 15 objects that have looping animations, and these objects are very small), no fading objects.

    Also, there is this problem with the screen which keeps blinking even though i have 'Clear Background' set to 'No'.

    I have over 300-400 objects in each level, and over 900 collision checks per sec.

    I have tried cutting the number of objects on half, but that didn't change anything (90% of my objects are not moving at all), the CustomMovement and some objects I am being scrolling (even though I use 'dt') are still in slow-motion and the screen keeps blinking.

    So, this is my first project and I am not very experienced with making performance more efficient....

    Any advices?

  • Play your game in "debug" mode to see where things are slow:

    1. Create a group called "test group" and move things into and out of this group. Narrow it down to a few event sheets that are the biggest resource hogs, and try to optimize from there.

    2. Put a text object called "fpstext", or something similar, in the upper left hand corner of the screen. Every tick, set fpstext's text to the following:

    round(fps)&newline&" FPS"&newline&round(cpuutilisation)&"% CPU"[/code:2z1y921z]
    
    With this in place, play the game on mobile.  If fps is low, but CPU is also low, it means you are limited by the GPU and need to use smaller textures to reduce the number of time pixels are being told to redraw each frame.  If fps is low and CPU is high, then you need to optimize your events because your mobile CPU can't keep up with your desktop.
  • Hi, thanks for the reply.

    I have already done step 1 (my CPU ranges from 12-30%, I've done everything I could to make it better, but that's all I can do, my events simply require this much CPU usage...)

    As for step 2 I have done this as well, but without the CPU, so, now I did just like you told me to and the CPU percentage is 0%, and occasionally becomes 1%, never more than that..

    Also, the fps seems to be even higher on my mobile device, it ranges from over 30 to 60. On my laptop the max is 40, but movement doesn't go into slow-motion as in mobile..

    Weird..

  • It sounds like you are GPU-limited. Is there a significant amount of pixel redraw going on with multiple transparent sprites trying to draw on the same pixel?

  • No. My game is something similar to the bomberman game. There are blocks placed in a grid and the player moves between these blocks. The only transparent thing in the layout are the shadows of these blocks, so I have disabled the shadows just to test if they are the source of the problem, but the problem with the movement was still there.

    Yet this problem occurs in other layouts as well, but there's also no transparent sprites..

  • Hmmm... Weird. What device are you testing on?

    I'm not much into 2D games -- everything I have been creating game-wise is 3D, and I have found most of the time on mobile I have been CPU-limited. Perhaps someone more experienced with 2D games has a better idea?

  • same here

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I am testing on multiple mobiles like samsung and xperia. The problem occurs on each one of them

  • I have made my own movement system, it is better now, but not perfect. Also, my fps sometimes drops bellow 30 (that's the minimum fps) and it causes the player to glitch and move through blocks..

    Also, the blinking on the screen is still there and I have no idea how to stop it :/

  • same here .. i'm suffering test and using html5 games on my mobile

    i'm using cordova and intel xdk

    the best to use before was ejecta it was very very fast than intel xdk or cordova

    but the c2 side has also the reason

  • I am using intel xdk as well.

    By the way, I have found a mistake in cjbruce's formula. 'cpuutilisation' has to be 'cpuutilisation*100' since it returns from 0 to 1.

    Therefore, my fps now ranges from 25 to 50 while the CPU is over 50-60.

    I guess it means that I need to work on improving my events..

  • If the CPU is only 50-60, it's got plenty of headroom, so it actually suggests the bottleneck is the GPU hardware. So you should probably focus on simplifying the rendering of the game.

  • Okay, then this explains why does my other layout (with even less CPU) also has poor performance.

    So, I should reduce the size of images? I have already rescaled them to a minimum. Or I should reduce the number of objects maybe?

  • Can somebody explain what do I have to do to simplify the rendering, sorry if I'm being such a noob :/

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)