2d – Keep a platform jump height compatible with different frame rates

You must decouple the rendering frequency from the simulation frequency: you measure the delay time, perform an appropriate amount of simulation steps, and then restore the frame.

To do this, the simplest way is to define a very high simulation frequency. For a platform game, this should be easily achievable. I suggest 240Hz or 480Hz.

Then, count the number of simulation frames that passed during your game loop and run them.

Let's say your sim rate is 240Hz.

If your FPS is 120, you perform two simulation steps. On a machine with 20 FPS, you must do 12.

If you can not afford a high simulation rate, people interpolate or extrapolate based on "time left".

This is the seminal article on this: Set your time step.

But personally, I use the high simulation rate approach.