Why are physics in some games somewhat connected to running fps?

194 views

take for example geometry dash and celeste.

in geometry dash, having a 360hz monitor will have slightly different gameplay than a 60hz, and some user created levels have made frame perfects that are only possible at 240hz+.

celeste has a 60fps cap, if you use assist mode’s builtin speedhack at 0.5x speed, since the game has 60fps cap, it’s effectively 120fps calculation. this also affects it, why?

In: 8

4 Answers

Anonymous 0 Comments

Physics game dev. here

*Note : I’ll explain this in a very simple term.*

Everything depends on FPS. In each frame, we calculate things and then send it to the display device(monitor f.ex). And a standard game runs on 60 FPS. This means that we make 60 calculations in a second.

So now, imagine you want to push a box to right side 1 cm. In a second with your base FPS rate, this means that your box is moved 60 centimeters to the right side. All is okay and no problems.

And then, you somehow alter the game’s capped FPS rate. Say you make it 140 FPS. This means that there’ll be 140 operations in a second, and your box is moved 140 cm to the right side. This is a behaviour you don’t really desire as it breaks the basic flow of the game

You can counter this by using **delta time**. This is essentially adjusting your FPS with the CPU clock time(okay, I’m getting out of ELI5 sorry). Now, instead of moving 1 cm to the right, you move less or more depending on if your FPS is higher or lower. If your FPS is 30, you move it 2 cm (2 cm * 30 operations = 60 centimeters) or if your FPS is 120, you move it 0.5 cm (0.5cm * 120 operations = 60 centimeters). In the end, you will move your box 60 centimeters nonetheless. The difference is determined by the delta time you get. There’s a lot more to add here, but this is for another topic.

I’m sorry that I’m not good at explaining this as ELI5. Hope it looks good 😅

Also, here’s [my game Physics! Fun](https://play.google.com/store/apps/details?id=com.foxtrio.physicsfun) that you can try(you can change FPS in the game as an option)

You are viewing 1 out of 4 answers, click here to view all answers.