0
\$\begingroup\$

If you use fixed time step and set it to for example 0.0166667 does it ever go up if the computer can't handle 60 updates/ticks per second?

\$\endgroup\$
0
\$\begingroup\$

The answer is basically no, most fixed timesteps don't adjust the timestep if they cant keep up.

The actual solution to this problem used depends on the needs of your game and the reasons that it can't keep up.

If the reason that it can't keep up is rendering on the GPU, that means that the CPU is able to do more work even though the GPU isn't. In this case, you may opt to have your game run multiple simulations for each render, to keep the simulation caught up to real time.

Note that if your game goes a lot faster than your fixed update time, you may also opt to do multiple renders between simulation updates, and maybe do a linear interpolation between last and next simulation datas to make a smoother looking simulation.

If it really just unable to keep up at all, often games will be ok with not keeping up with real time and just letting the game run more slowly, but keeping the time step the same.

The reason most fixed timestep games don't adjust time steps when they run too slowly is that adjusting the time step at all ever makes you lose whatever benefits of fixed time steps that made you decide to use them - like deterministic simulation, or consistent physics behaviors.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.