Game dev
Saved & recent

Latency

Related terms: ping, lag, round trip, jitter, packet loss

The time data takes to travel between machines. Ping is the round trip in milliseconds: out to the server and back. Whatever the server decides, the player sees it one ping after they acted.

Jitter is latency that keeps changing. Packet loss is messages that never arrive. Most networking code in a game exists to hide these three things.

Further reading
Glenn Fiedler: Snapshot Interpolation
client server 52 ms round trip REQ ACK packet loss 0 20 40 60 80 100 elapsed time (ms)
The 52 ms round trip includes 24 ms in each direction and 4 ms on the server. A later packet ends before it reaches the server.

View in the full Game dev collection