The clock hidden inside a movement update
A game usually redraws the screen in steps called frames. If a character’s position changes by a fixed amount on every step, the game has quietly made frame count its clock: a machine that produces more frames advances the character more often.
Delta time, often written as dt, is the measured time since the previous frame. Instead of moving a character by a fixed distance per frame, the game multiplies its speed by dt. A speed of 5 units per second, for example, means moving about 0.08 units during a frame that lasts one-sixtieth of a second, but about 0.17 units during a frame that lasts one-thirtieth of a second. The slower-running game takes fewer, larger steps; over the same real second, the intended travel distance is nearly the same.
Why the calculation matters
This turns a design value such as “units per second” into a change in position for the current frame. It also helps movement stay consistent when frame times fluctuate—for example, when a busy scene briefly makes the computer miss its usual pace. Without that conversion, a slowdown could make the world itself seem to slow down, even if the game’s intended character speed had not changed.
The same idea applies to many continuous changes, including camera movement and animations. But it is not a magic guarantee: large, irregular time steps can make motion or collisions behave poorly. Some games therefore run physics in fixed-size simulation steps and use the changing frame time mainly to decide how much simulation time to advance. The important design choice is to make elapsed real time, rather than the number of redraws, the basis of how far the game world progresses.






