Skip to main content
ExplainerMultiplayer NetworkingDeterministic Lockstep· 6 min read· in Entertainment

Deterministic Lockstep Saves Multiplayer Bandwidth by Transmitting Keystrokes Instead of Coordinates

By broadcasting player inputs rather than the absolute positions of moving objects, deterministic lockstep decouples network bandwidth from the scale of a virtual world. The architecture allows real-time strategy games to simulate thousands of units over dial-up connections, provided every machine calculates the exact same math.

By Joao Marques

Share this story

In short

  1. Deterministic lockstep transmits only player keystrokes and mouse clicks, relying on each computer to calculate the resulting physics locally.
  2. Decoupling bandwidth from the on-screen entity count allowed 1990s strategy games to simulate thousands of units over 28.8 kbps dial-up modems.
  3. The architecture requires bit-for-bit identical math across all machines, forcing developers to abandon standard floating-point calculations to prevent desynchronization.

The survival of a multiplayer simulation is decided the moment the engine chooses what data to push through the network socket. Instead of transmitting the result of an action—the exact coordinates of a moving archer—the system transmits only the catalyst. By sending the mouse click and trusting the receiving machine to calculate the rest, the architecture decouples bandwidth from the scale of the virtual world.[1][4]

This approach is known as deterministic lockstep. It is the invisible mechanism that allows real-time strategy games to render thousands of colliding units without choking the connection. If a server attempted to broadcast the position, velocity, and health of every single soldier, the data payload would instantly overwhelm a standard residential router.[1]

Instead, the network acts as a simple courier for human intent. When a player orders a battalion to march, the game does not send a thousand trajectory updates. It sends a single command: "Player One pressed right-click at this map coordinate on frame 400."[2][4]

The Illusion of a Shared Reality

Every player in a lockstep match is actually playing a completely isolated, local copy of the game. There is no central server dictating where the trees are or how fast a cavalry unit is moving. The machines simply agree to start at the exact same initial state and process the exact same list of keystrokes in the exact same order.[1][2]

Because the underlying math is identical, the isolated simulations arrive at the exact same conclusions. If the inputs match, the outputs must match. This is the "deterministic" half of the equation: a guarantee that a specific catalyst will always produce a specific, bit-for-bit identical result across every computer in the lobby.[2]

Bandwidth consumption in a lockstep model remains flat regardless of how many entities are simulated on screen.

"Determinism means that given the same initial condition and the same set of inputs your simulation gives exactly the same result," writes network engineer Glenn Fiedler. "Not close. Not near enough. Exactly the same down to the bit-level."[2]

The "lockstep" half dictates the flow of time. A machine cannot simulate frame 401 until it has received the inputs from every other player for frame 400. The simulation steps forward together, pausing if a packet from a lagging player is delayed in transit.[2][4]

Beating the Dial-Up Bottleneck

This architecture was forged under the severe hardware constraints of the late 1990s. When developers were building the original Age of Empires, they wanted eight players to command sprawling armies over 28.8-kilobit modems. That bandwidth was barely enough to transmit plain text, let alone a dynamic battlefield.[1]

If the engine had continuously transmitted every unit's position, status, and direction, the network would have capped the game at roughly 250 moving objects. That limitation would have fundamentally changed the genre, reducing massive historical sieges to minor skirmishes.[1]

By switching to deterministic lockstep, the developers bypassed the entity limit entirely. Because bandwidth consumption was tied only to the player's physical keystrokes, the network cost of moving one unit was identical to the cost of moving 1,500 units. The simulation simply ran the local math.[1][4]

Transmitting inputs instead of coordinates allowed 1990s strategy games to increase their unit caps by 600 percent.

"Instead of synchronizing the world, the game synchronized the decisions that changed it," notes a retrospective on the engine's architecture. The trade-off was processing power: every client had to compute the entire world's logic, rather than just rendering the graphics.[1]

The Butterfly Effect of Floating Points

While lockstep solves the bandwidth problem, it introduces a brutal engineering constraint. The simulation must be perfectly sealed against any outside variance. If one machine calculates an archer's position to be a fraction of a millimeter further left than another machine, the entire match is doomed.[1][2]

That tiny discrepancy will compound. The archer might bump into a villager on one screen but miss them on another. The villager's delayed path alters resource collection, which delays a building's construction, which changes the timing of an attack. Minutes later, the two simulations will completely desynchronize, and the game will crash.[1]

Achieving this perfect consistency is notoriously difficult because modern processors handle floating-point decimal math differently. A calculation like a sine wave might yield a slightly different rounding error on an Intel chip compared to an AMD processor.[2][4]

To survive, lockstep engines often abandon standard floating-point math entirely. Developers build custom fixed-point math libraries and implement shared pseudo-random number generators. If a villager chops a tree, the "random" sound effect that plays must be pulled from the exact same seed on every machine.[2][4]

The Evolution Into Rollback Netcode

The fatal flaw of pure lockstep is its reliance on the slowest connection. Because the engine must wait for every player's input before advancing the frame, a single lagging connection forces everyone else's game to stutter and freeze. The simulation is held hostage by the weakest link.[2][3]

In genres that require split-second reactions, like fighting games, this stutter is unacceptable. To solve it, developers evolved lockstep into "rollback" netcode. The underlying determinism remains, but the engine no longer waits for delayed packets to arrive.[3]

Rollback netcode masks latency by predicting delayed inputs and instantly rewinding the simulation if the prediction was wrong.

Instead, the game predicts what the lagging opponent is going to do—usually assuming they will just keep doing whatever they were doing a frame ago. The local simulation advances instantly, keeping the gameplay perfectly smooth for the local player.[3]

If the delayed packet finally arrives and contradicts the prediction, the engine performs a violent correction. It rewinds the simulation state to the moment of the error, applies the correct input, and fast-forwards back to the present. This all happens in a fraction of a 16-millisecond frame, completely invisible to the human eye.[3][4]

Why Modern Shooters Reject the Model

Despite its elegance, deterministic lockstep is rarely used in modern first-person shooters or massive open-world games. Those environments are simply too complex to keep perfectly deterministic. A physics engine calculating the chaotic bounce of a grenade across uneven terrain will inevitably produce micro-variations.[2][4]

Instead, shooters rely on an authoritative server model. The server runs the true simulation and constantly broadcasts absolute coordinates to the clients. If a client disagrees with the server about where a player is standing, the server forcefully snaps the player back into place.[4]

Illustration: In a lockstep match, the network acts as a simple courier for human intent, transmitting only the physical keystrokes.

This state-synchronization approach requires vastly more bandwidth, which is why modern shooters demand broadband connections. But it allows developers to use standard physics engines and prevents players from hacking the game by modifying their local simulation.[2][4]

Lockstep remains the gold standard only where entity counts are massive and inputs are sparse. By trusting the math rather than the network, strategy games continue to render thousands of colliding variables across the globe, bound together by nothing more than a synchronized list of clicks.[1][4]

How we did this

Method
Compared bandwidth consumption models between state-synchronization (transmitting absolute coordinates and velocities) and deterministic lockstep (transmitting only player inputs) across varying unit counts.
What we found
Transmitting inputs instead of coordinates decouples bandwidth requirements from the on-screen entity count, allowing a 600% increase in simulated units while remaining within the 28.8 kbps threshold of legacy modems.
What we worked from
  • State-sync bandwidth limit for moving objects: 250 units — Game Developer
  • Lockstep bandwidth limit for moving objects: 1,500 units — Game Developer
Limits of this analysis
This analysis relies on 1990s modem bandwidth constraints, which are no longer the primary bottleneck for modern multiplayer architectures.

Key terms

Deterministic Lockstep
A networking model where clients exchange only player inputs and wait for all commands before simulating the next identical frame.
State Synchronization
A networking model where a central server calculates the game and continuously broadcasts the absolute coordinates of every object.
Desynchronization
A fatal error where two local simulations calculate slightly different outcomes, causing the shared reality of the match to split and crash.
Rollback Netcode
An evolution of lockstep that predicts missing inputs to keep gameplay smooth, rewinding and correcting the simulation if the prediction was wrong.
Fixed-Point Math
A method of calculating decimals that guarantees the exact same rounding result across all processor architectures, preventing desynchronization.

Frequently asked

What happens if a player's internet connection drops during a lockstep game?

The entire simulation pauses for all players. Because the engine cannot advance the frame without the missing player's input, the game will freeze until the connection is restored or the player is dropped.

Why don't modern battle royale games use deterministic lockstep?

Open-world games rely on complex, chaotic physics engines that are nearly impossible to keep perfectly deterministic across different hardware. They use authoritative servers instead.

How does rollback netcode fix the stuttering problem?

It predicts the delayed player's inputs and advances the game instantly. If the prediction is wrong, it rewinds the simulation and corrects the error in a fraction of a second.

Viewpoints in depth

Lockstep Purists

Advocates for traditional real-time strategy architecture argue that strict lockstep is the only viable way to simulate massive armies.

By trusting the local hardware to run the math, developers can scale the visual complexity of a battle infinitely without requiring expensive dedicated servers or massive broadband pipes. This camp views the strict requirement for bit-for-bit identical math not as a burden, but as a necessary discipline that forces cleaner, more predictable engine architecture.

Rollback Advocates

Fighting game developers argue that pure lockstep is fundamentally flawed because it ties the game's framerate to the slowest connection in the lobby.

They champion rollback netcode, which preserves the bandwidth efficiency of input-syncing but masks the latency by predicting frames and correcting errors after the fact. For this camp, the illusion of a zero-latency environment is worth the massive CPU overhead required to instantly rewind and resimulate multiple frames of gameplay.

Authoritative Server Proponents

Engineers working on modern shooters and open-world games view determinism as an impossible constraint.

They argue that relying on authoritative servers to broadcast absolute coordinates is the only way to support complex physics engines and prevent clients from hacking the local simulation. While this approach demands significantly more bandwidth, this camp believes the trade-off is necessary to support the chaotic, non-deterministic environments that define modern AAA titles.

Lockstep Purists 40%Rollback Advocates 35%Authoritative Server Proponents 25%
Lockstep Purists
Value bandwidth efficiency and perfect synchronization for massive unit counts.
Rollback Advocates
Prioritize input responsiveness and latency-hiding over strict lockstep waiting.
Authoritative Server Proponents
Favor state-synchronization to prevent cheating and support complex, non-deterministic physics.

Perspectives this story doesn't cover

  • Cloud Server Providers
  • Casual Players

Sources

Source coverage

4 outlets

3 viewpoints surfaced

Lockstep Purists 40%Rollback Advocates 35%Authoritative Server Proponents 25%
  1. [1]Game DeveloperLockstep Purists

    1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond

    Read on Game Developer →
  2. [2]Gaffer On GamesAuthoritative Server Proponents

    Deterministic Lockstep

    Read on Gaffer On Games →
  3. [3]WikipediaRollback Advocates

    GGPO

    Read on Wikipedia →
  4. [4]Factlen Editorial Team

    Synthesis by Factlen editorial team

    Read on Factlen Editorial Team →

Comments

Stay informed

Every angle. Every day.

Get Entertainment stories with full source coverage and perspective breakdowns, free every day.