Latency, Ping and Jitter
A Manja Arena player in Singapore insists their pulls "land late". Their internet plan is fast, so what is slow? How many bytes a connection carries per second and how long each byte takes to arrive are two different things, and a real-time game cares most about the second.
The rule
Felt delay ≈ round-trip time + up to one tick.
Three terms to own:
- Latency — how long a message takes to travel one way, for example from client to server.
- Round-trip time (RTT) — there and back again. The "ping" number in the corner of a game screen is an RTT.
- Jitter — how much the delay wobbles from one packet to the next. Pings of 40, 41, 39, 95 and 40 ms have a decent average but real jitter: that 95 arrives late and breaks the rhythm.
Where does the delay come from? Mostly distance. Light in optical fibre covers roughly 200 km every millisecond. Mumbai to Singapore is about 3,900 km in a straight line, and cables never run straight, so no network can give that player a round trip much below 40 ms; in practice it is often 60 to 70 ms. On top of that comes queuing: time spent waiting in busy routers and on crowded home Wi-Fi. Queues grow and shrink from moment to moment, which is where most jitter comes from.
Then the server adds a delay of its own. An input that arrives just after a tick has started waits for the next tick before it is applied. At 20 Hz that wait is anywhere from 0 to 50 ms.
The shortcut
Add up the delay in the order the player's action travels: out, wait for the tick, back. Out plus back is the RTT; the wait is at most one tick.
Out
The Delhi player's RTT to Mumbai is 30 ms, so the "pull" input takes about 15 ms to reach the server.
Clever code cannot beat distance. What you can change is everything else: a server region closer to the players, such as a Singapore server for Southeast Asia; a higher tick rate to shrink the wait; and smoothing on the client, the subject of the next lesson, to hide jitter.
Drills
Answer fast — trust the rule.
A player's ping is 60 ms, and the path takes equally long in each direction. What is the one-way latency?
Five pings read 40, 41, 39, 95 and 40 ms. What does the 95 show?
Ignoring the player's own frame time, what is the worst-case felt delay for a player with a 30 ms RTT on a 20 Hz server?
Which change lowers the smallest RTT a player in Chennai can possibly get?
Why does a fast 500 Mbit/s home plan not guarantee a low ping?
Remember
- Felt delay ≈ round-trip time + up to one tick.
- Shortcut: out, wait for the tick, back.
- Trap: confusing bandwidth with latency. Distance sets a floor that no code can beat.
