3 ms·
Fully agreed. You can certainly deal with some aspects of variable framerate integration. But it's by far a better solution, more future proof even, to just hav
by p0nce 10y ago
Fully agreed. You can certainly deal with some aspects of variable framerate integration. But it's by far a better solution, more future proof even, to just have a fixed number of iterations by second and don't account for time deltas in integration.
My physics-based game is using the method argued against. Never again, integrating every behaviour over time got sometimes surprisingly hard. It also costs a lot of exp() and log() calls.
https://auburnsounds.itch.io/vibrant https://auburnsounds.itch.io/vibrant
(of course multiplayer is impossible now)
Some of the AI is still framerate-dependent, because:
// fixed framerate
if (randomFloat0To1() < 0.1f)
doThis();
becomes a Poisson distribution sampling.
- strainer 10y agoWe do also loose much accuracy/stability of physics info when varying timesteps, without adjusting velocities to the new half timestep (eg. verlet type refinement) which is a bit demanding to do most accurately.