3d Physics FPS set to 120 but game runs at 70fps max - what will happen?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Macryc

Hi.

I recently tried upping the physics FPS to 120 (from default 60) in my 3d game. The game now looks and feels much smoother but …

What if someone runs the game on an older PC that is unable to run it above 120 fps?
I can’t test it myself as I only have one PC and it runs the game at approx. 150fps on average and my display refresh rate is 240hz so things are nice and smooth.
But what if someone’s PC runs the game at, say, 70fps at most? What will happen to physics when it’s unable to execute its fixed FPS of 120? Will there be frame drops? Errors?

When you say runs at 70fps, do you mean refresh rate? That’s separate from the physics step used to calculate things that must happen at fixed intervals.The default is 60 which is trivial, unless you’re doing something insane - attempting 120 is fine and if there are skipped steps it will just slow physics calculations that may effect what’s seen on screen. As you’re already asking the engine calculate physics above its default, there’s margin for error.

As with anything, your individual game results may vary and you’re just going to have to try it if it is an important factor of your game.

spaceyjase | 2021-11-18 09:23

I can’t test it myself as I only have one PC and it runs the game at approx. 150fps on average and my display refresh rate is 240hz so things are nice and smooth.

You can both lower your physical monitor framerate (in OS’ monitor settings) and simulate low end computer, by introducing delay in Godot’s CLI debug options godot --frame-delay 123

sash-rc | 2021-11-18 11:02

:bust_in_silhouette: Reply From: Calinou

Using physics FPS greater than rendering FPS works just fine, at least until you reach a framerate lower than physics_fps / 8. If the rendering framerate reaches a lower value, then the game will appear to slow down because only 8 physics ticks may be run per rendered frame (this is currently hardcoded).

For instance, if you set Physics Fps to 240 in the Project Settings, the game will still run at the intended speed at framerates greater than or equal to 30.