Exported Game is Lagging

I have exported my game as an apk file and I tried installing it. It’s kinda laggy, I have no idea if it’s just my phone or the game itself that is lagging. Is there a way to make my game smooth?

Go to settings there are some options like max fps(framespersecond) or screen size.
if all of this do not work then export the game again.
Pleas show your settings and a screenrecording from the laggy gameplay.

1 Like

how much should I reduce the max FPS to?

Like 300 or more, what you like.

1 Like

I could be wrong but I can’t reduce the fps to 300, or do you mean increase it to 300? I’ll try this and see if it works, I’ll send the screen record, thank you so much :heart:

Yea min fps like 30 or 60 and max fps like 300 or more.

Can you explain why you are suggesting those numbers? 300 seems an absurdly high number given a standard phone runs at about 30-60 FPS.

In my experience, reducing FPS below 60 brings more problems than solutions. In general, limiting up to 60 is fine. You will surely have a major loss in some aspect of your game. Use the debugger to see which section consumes more resources, the rendering or the logical part, and if it is the logical part, see what events are causing this. It makes sense that it works better on a PC because they are generally more powerful than a smartphone. You must group the events into “Event Groups” to be able to discriminate their consumption in the debugger profiler.
If the events consume a lot, you should find a way to modify them so that they consume less resources and achieve the same objectives as they had.
https://wiki.gdevelop.io/gdevelop5/interface/debugger/profile-your-game/

I like that idea, though it would only work if @Szeyal previews over network (WiFi). The resource consumption may be different on each device, so seeing where the PC uses the most resource is probably different to a phone and not much point to it.

That is also correct. To achieve this you first have to preview the game on PC and close the preview without closing the “Debugger” window. Then you do a preview via WIFI/LAN.
https://wiki.gdevelop.io/gdevelop5/interface/preview/#start-multiple-live-previews
By having the preview open on the smartphone, you have to analyze the consumption with the debugger from the PC.
Maybe, if this is new to you, you should start using the debugger in the preview on the PC and guide yourself with it to reduce the consumption of the game.

From my experience it really does make sense. Although it is not exact, a fairly accurate consumption parallel can be established. It is much faster to do the analysis and, it must be taken into account, the preview on a smartphone via WIFI will always work noticeably better than in the exported APK, which can also cause confusion about the true performance.

It’s also worth noting that some phones have 144 and 165hz displays. As far as I know, chromium based apps are locked with Vsync even on mobile.

A 60fps game will bump down to the nearest even divisor multiple for the refresh rate, which for 165hz will be 15 fps, and for a 144hz display it’ll just outright get weird (I’ve seen sometimes 20 fps, sometimes 15, neither of which make any sense).