Download

[Discussion] Getting the same result independently of fps

Background
Getting the same experience at 30 fps as for 200+ fps, is something I’m trying to accomplish.

The ultimate way would be to use fixed time step, and do sub stepping, but I want higher fps to make the game somewhat smoother.

So the problem is all kinds of usage of euler integration

Updating speed each tick is not foolproof.

Calculating something based on probability each frame is doomed to vary.

Suggestion
Have curves describe the desired position over time, instead of using velocity.

Calculate time for next event to happen, instead of using probability.

Instead of trowing a die, shuffle cards.

What’s your ideas and experiences?

use DeltaTime from Tick() function.

Yes, what you do in the Tick() function depends on DeltaTime.

But when the relationships are non-linear to DeltaTime things start to get complicated.

DeltaTime is probably enough for most purposes.

Otherwise you can try a fixed update with an accumulator (useful to get deterministic physics, among other things).

See this blog: http://gafferongames.com/game-physics/fix-your-timestep/