Why do some games run in slow motion when they lag?
Some games move characters a fixed number of pixels every frame. At 60 frames a second that looks right, but at 30 the character covers half the ground, and at 144 it zooms. The fix is delta time: move by speed times the time the frame took. Fast or slow, every computer then moves at the same speed.
- Time per frame
- 11.1 ms
- Frame-based speed
- 450 px/s
- Delta-time speed (any fps)
- 300 px/s
- Frame-based ÷ intended
- ×1.5
Challenge: Find the frame rate that makes the frame-based runner exactly 2.4 times too fast.
More settings
Play
Pick "Lagging at 30 fps" and press "Run it: race for 2 seconds." Then try the 144 Hz monitor.
Challenge: Find the frame rate that makes the frame-based runner exactly 2.4 times too fast. The box under the picture turns green when you get it.
Stuck? Pick one of the examples from the “Try an example” menu, or press “New example.”
Understand
A frame at frames per second lasts seconds. If a game adds the same step every frame, the speed is step × fps: right at 60 fps, half at 30, and 2.4× at 144. That's a ratio, and it's tied to the computer, not the game.
The fix multiplies by the frame time:
Fewer frames mean bigger steps, more frames mean smaller ones, and the total per second is the same. Press "Run it" to race the two runners. The tick marks show where each frame lands.
Use
Every input has a unit menu, so you can type values in the units you already have. Results follow your units.
Show the work
- Time per frame
\Delta t = \frac{1}{90}\ \text{s} = 11.11\ \text{ms} - Frame-based: the same step every frame, so speed rises and falls with the frame rate
5 \times 90 = 450\ \text{px/s} - Delta time: the intended speed times the time this frame took
300 \times \frac{1}{90} = 3.333\ \text{px per frame} - That always adds up to the intended speed
3.333 \times 90 = 300\ \text{px/s}
Export
Pick the frame rate the computer actually gets. "More settings" changes the frame-based runner's step.
- Physics engines often run at a fixed rate behind the scenes for stability, which is a different fix to the same problem.
For learning and estimation. Verify with applicable codes, standards, and a qualified professional before using in design, construction, or safety-critical work.
Cheat card
| Symbol | Meaning | Unit |
|---|---|---|
| time one frame takes | s | |
| frames per second |
- 60 fps is about 16.7 ms a frame; 144 fps is about 6.9 ms.
- Speed × time = distance, so multiplying by the frame time turns a speed into the right step for each frame.
- Delta time keeps speed right, but a higher frame rate still looks smoother. There are more, smaller steps.
Where it’s used
- Computer Science
Game engines hand every update a "delta time" so movement, timers, and animations stay frame-rate independent. - Computer Science
Video players and animations use the same idea to stay in sync whatever the device. - Hobbies & Crafts
Some older console games ran faster in one country than another because TVs there refreshed at a different rate.
Related exhibits
- Start here
Turning your spaceship: where “forward” comes from
Point the ship at an angle and forward is (cos θ, sin θ). Thrust adds to the speed you already have, so in space you drift.
- Go further
Grid movement: walking, diagonals, and flying
Without diagonals you walk |Δx| + |Δy| steps. With them it’s fewer steps, but each diagonal is √2 tiles long, about 1.41.
- Also try
Why fast bullets pass through walls: tunneling
Games move things in jumps, one per frame. If a bullet jumps farther than the wall is thick, it can skip right over it.
- Also try
Delay times that lock to the beat: BPM to milliseconds
One beat lasts 60,000 ÷ BPM milliseconds. Every echo setting is a fraction of that beat.
Questions people ask
What is delta time?
The time since the last frame. Multiplying speeds by it makes movement depend on real time instead of on how many frames the computer can draw.
Why does a laggy game sometimes slow down instead of skipping?
If it moves things a fixed amount per frame, fewer frames per second means less movement per second, so everything looks like slow motion.
Does a higher frame rate make me faster?
Not in a game that uses delta time. It just makes motion smoother. In a game that doesn't, it really can speed things up.
Updated : First published.