한국어English日本語简体中文繁體中文DeutschไทยTiếng ViệtРусскийPortuguês (Brasil)EspañolBahasa Indonesia

Game Lag White Paper › Netcode design

Lockstep waiting on the slowest player Lockstep waits for the slowest peer

Cause ID sy-lockstep · Primary owner Game team (Server development) · Also Game team (Client development)

Open the interactive card with figures and simulations →

When everyone computes the same turn together, one player’s late input makes everyone wait.

Why Each turn can be computed only after every player’s input has arrived → Effect One player’s input arrives late because of jitter or packet loss → On screen Everyone hitches at the same time, and in bad cases a “Waiting for players” window appears

Symptoms
Freeze, Stutter, Input lag
Factors
Jitter, Packet loss, Stall
Who’s affected
Specific zone/channel
When
Randomly
Owner
Primary owner Game team (Server development) · Also Game team (Client development)
Game team action items
Server: adjust input delay automatically to ping, drop only the lagging player for a moment so everyone else keeps going without waiting. Client: apply the agreed input delay, in P2P without a relay server have the host client also handle input delay adjustment and lagging players.
Ballpark numbers
If you set input delay shorter than “time for an input to reach the other player + jitter,” freezes become frequent. That time is half the ping when players exchange inputs directly, and about half the sum of both players’ pings through a relay server.
On the graph
Random spikes · Turn wait time, input arrival delay per player
Where to look
Per turn, each player’s input arrival time and how long the turn stalled waiting, and whose input each stalled turn was waiting for. With a relay server, also visible in a server-side packet capture as the arrival interval of each player’s input packets
Confirmed if
In every stalled turn, the same one player’s input arrived later than the input delay, and that player’s jitter/loss spiked at the same time
Ruled out if
All inputs arrived on time but it still stalls: points to the slowest PC’s computation time or server processing. No stalls but results differ between two screens: a desync, so check “Pathfinding mismatch in command sync”
Check with
Game server or client logs and metrics

Sources

  1. Deterministic Lockstep Gaffer On Games
    Frame n can be computed only after all its inputs arrive, so a late input means waiting; a small playout delay buffer for absorbing jitter causes hitches
  2. 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond Game Developer
    Commands are scheduled to run two turns later, and turn length is adjusted to the slowest computer and ping (Speed Control)
  3. A Survey and Taxonomy of Latency Compensation Techniques for Network Computer Games (ACM Computing Surveys, 2022) ACM
    Input delay (incoming delay) is set to the “A→server + server→B” latency so everyone applies inputs at the same moment

See also

Same layer: Netcode design

Same symptom (Freeze), other layers

View the interactive card with figures and simulations