FPS Lock not working?

Hello!

I’m very new to the Defold game engine and I noticed that the game doesn’t lock the frame rate in any way and just to whatever your monitor supports. This makes the game run too fast if the monitor is above the designed. For example, with a 120 hz monitor, the game would run twice as fast as on a 60 hz monitor. I thought the “update_frequency” option in game.project would fix it, but to my testing, it doesn’t do anything to the actual frame rate.

Am I missing something or is this just a bug?
Thanks, Krax :slight_smile:

Hi @kraxarn!

If “update_frequency” isn’t set, you should get a variable framerate, and vice versa.

However, if you’re on Windows, I believe you have stumbled upon this issue, which makes the engine will not respect the vsync properly. Could this be what you are experiencing? There is a workaround described there, perhaps that’s an option for you.

Similar issue, although, not the same fix, since my monitor is 165 hz, which makes the game run at 165 fps instead of 60 fps. If I disable Vsync instead, the game runs at 5000 fps. I currently don’t have another pc with a monitor that’s more than 60 hz to try the issue on other operating systems.

1 Like

Any update on why this still isn’t fixed?