Networking6 min read
Latency, jitter and packet loss are three different problems
Players call all of it lag. The three have different causes and different fixes, and telling them apart takes about a minute.
Everything that feels bad on a network gets called lag, which is why so much time is wasted fixing the wrong thing. There are three distinct problems and they are easy to distinguish once you know what to look at.
The three
- Latency: how long a round trip takes. Bounded by distance and largely fixed for a given location.
- Jitter: how much that time varies. This is what makes movement feel wrong even at a good average.
- Packet loss: messages that never arrive. This is what makes players teleport.
Which one you have
A continuous ping for sixty seconds answers it. A steady high number is latency and means the server is far away. A number that swings wildly is jitter, usually on somebody's own connection or on wifi. Missing replies are loss, and loss anywhere on the path affects everybody after it.
Consistent 90 ms plays better than a jittery 40. Predictability beats speed in a game.