Question regarding FPS drop

Greetings, quick question: How can I identify what the reason behind a constant FPS drop is on a browser preview?

I can’t reproduce the FPS drop at all on any of my browser previews, but other devices can always.

The debugger (profiler) in my GDevelop preview showed 0.33 ms during the scene that other devices ran slower when they were browser previewing, so the game is optimized and it can’t be the problem.

Thanks in advance.

If you are developing and previewing on a PC, it could well be that the specs are a lot better than the other devices or browsers. If that’s the case, then chances are you won’t have issues with the preview though that’s not an indication the game is optimised. It’s just that the hardware speed can handle it better.

It can depend on what you are doing in the game. Do you have a lot of physics objects on screen at once? Do you have a few effects playing? Do you have a lot of “For each object…” events?

1 Like

Yeah, I am developing on PC and I do have a strong gaming PC which might the reason why I cannot reproduce the issue on my end. My game doesn’t use effects and it starts lagging for others immediately after entering the game.

But what I’m interested the most now is: How would I playtest and debug this problem on my own? There has to be some way to effectively diagnose whether I’m coming closer to a solution and gaining better performance…

I can share my file with you, if you think that could help identify the problem.

You could try debugging across network and use your device to run it over WiFi while watching the debug info on your PC. I think that may work.

If that fails, PM me a link to the zipped up project, and I’ll give it a run on my surface laptop 2. It may be low specced enough to be affected.

1 Like

Gotcha, I’ll get back to you.

1 Like

One thing to always keep in mind:

If your max FPS is 60, and the tester’s PC is 144hz, they will see framedrops. This is a side effect of Chromium/Electron forcing Vsync, and vsync requires the FPS to be an even divisor of the monitor refresh rate and an even divisor of the original framerate.

e.g. If your max FPS is 60, and their refresh rate is 144hz, the FPS will drop to 48 as that’s the nearest divisor for both the 60 fps and 144hz.

This may not be related to the issue, but it’s always a good thing to check.

2 Likes

That may very well be the issue here, I did not know that at all.

I do limit the max and min FPS of all my games to 60, and the devices that playtested the game have a high refresh rate. However, my PC is running on a high refresh rate as well and the problem doesn’t exist in my case, so I don’t know what to think of that.

Not sure how would I find a solution to this if I want to keep the max FPS of 60.

I’ll check the debugger when I get the time and send the zipped file after I check the performance on my phone.

Playtested on my phone – the results did not consist of any framerate drops. The debugger showed a low 1 to 2 ms on the profiler for the first scene, on which other stronger devices (PCs) did have an FPS drop. The second (main) scene showed around 8 ms, of which around 65% was because of rendering.

I’ll be sharing the zipped file in your DMs if you don’t mind.
I hope we’ll solve this issue one way or another!

1 Like

I managed to get the game to run slowly on my phone via Network preview. Like your tests, the profiler showed the rendering was the biggest resource hog.

I’ve spotted a similar issue a few years back, and the problem then was with the screen and object shake extensions. I tested this by taking out the extensions and the associated actions. And the game ran a more smoothly.

If you can replicate the screen and object shaking without the extension, you may be able to resolve the FPS drop.

1 Like