FPS or Something Else?

I exported my very first game in android and try it on my phone. It’s only one level because I simply try what’s looks like on the phone. But when I played it, It’s kinda rough than when I’m testing it on PC. I guess it’s not about the specs of my phone because it has a high specs. I’m guessing it’s about the FPS because I limit it to maximum 60 FPS. Is that the reason why it’s a little rough on playing on other devices? or something else?

It may be the processing power of the Android device that’s holding it back. You could check the actual FPS by adding a small text object to the scene and updating it with the FPS every second. I use the following to check the FPS in my games:

The other thing is that I found when I played round with Unity, is that shaders can have quite an impact on the performance. The PCs seemed to handle it ok, but my Android devices really struggled. Check if you have effects on your layers, as my understanding it that the effects are shaders under another name.

Also, check out http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/how-to-debug-poor-performance, a link that Gruk posted in another thread. This may help improve performance.

For me, the big performance impactors are:

  • Sprite masks (note, this is not collision masks)
  • Lots of Repeat for Each Object
  • Layer effects
  • Objects not set as hidden that are always completely obscured by other objects.

I use FPS counter and it’s in 60 - 59 FPS. I don’t have layer effects, I have some repeat for object (6 - 10), I don’t have hidden objects. I don’t know what’s a sprite masks can you tell me what it is?

60 fps should feel nice. maybe you can describe a little better what you mean with rough?

make sure that all your events trigger only when needed.
search for events, that do not have trigger once or at the beginning of the scene and look what trigger condition they have.
this can be very crucial, especially when creating objects and pretty much anything that does not check for a single variable.

1 Like

What’s the FPS on the Android device? And as @Slash said, what do you mean by rough? I assumed it meant the movement was a bit choppy or jerky.

If you don’t know what a sprite mask is, then you won’t be using one. But, to answer your question, a sprite mask lets you show only a part of a sprite. Check out this post that has a couple of links to sprite masking examples to get an understanding

1 Like

I will try to export it again with the fps counter on it to see if there’s a difference in pc and smartphones. You two were right, the movement was a bit choppy. Thanks for helping me!