A breakdown of “ping” in online games

Throughout many years of gaming I’ve heard many explanations of what “ping” is and how it negatively affects gameplay. While most people can agree that a high “ping” is bad and a low ping is good, typically their understanding of the subject ends there.

Before I go any further, I would like to clarify the proper terminology. The word ping is commonly used as a measurement for some sort of speed, but in fact the correct word here is latency. People misconceive ping and latency to be synonyms; while they are used that way in many modern games they do have slightly different meanings. Ping is a name given to a tool included by default in all major operating systems to measure latency. The word originates from echo location sonar technology, where a device would audibly “ping” to pinpoint objects in water based on how the sound travels.

The ping tool on my Mac

In network technology, latency is the measure of a packet’s round-trip time. Here’s an example of how latency is calculated:

You’re on a computer and you send a tiny message (called a packet) to someone else over the internet. They get the message and send you back a small reply confirming the message was received. The time it takes for this entire round-trip is the network latency.

You may think that this process would take a lot of time, but fortunately networks have gotten really fast. We usually measure latency in terms of milliseconds, or ms for short, which is 1/1000th of a second. From the image above my latency to google.com was on average 26.007ms which is just over 0.025seconds. Remember this is a round trip calculation, so an acceptable one way approximation would just be the latency divided by 2. This isn’t always accurate because sometimes a single packet takes different routes going to another server and coming back.

For most web activities your latency will be well below 200ms and that’s perfectly fine. Streaming music and videos, file downloads, and web surfing are very much usable even with high latencies. Refer back to a long distance phone call from just a few years ago, where the audio would delay a few seconds behind. When you spoke with someone you would feel the low latency of your voices being carried back and forth by how long of a pause there was before the other person replied. This wasn’t a big deal, but like game systems you would end up speaking over each other and having to figure out the order and meaning of messages.

Latency becomes a concern when you need to communicate with another machine on a network with real time updates very quickly. High frequency trading (HFT) companies build their data centers and offices physically near stock exchanges to minimize the latency of their communications. This way they can see when a buy or sell order goes out and butt in the way of the original order to send their own orders faster and screw the original order. Online gaming also requires good latency, especially when competing against other real players. Just like with HFT, lower latency lends to an unfair advantage.

In a popular shooting game, Counter-Strike, checking the scoreboard shows all player’s latencies at all times because it’s that big of a deal.

The leftmost column marked as Ping is in fact the latency to the server you are playing on.

In the context of this shooting game, here’s how latency (called ping in the game) affects the gameplay. Say you and your opponent are standing still and facing each other, a few meters apart. You are both aiming your weapons at each other and it takes just one shot to kill someone with this weapon. If you have a latency of 50ms and your opponent has a latency of 100ms, and you both fire your weapons at the exact same time you will win and he will die. But remember latency is a round-trip calculation, so for the server to register your shot (considering no packet loss or choke) it would take about 50/2 = 25ms, and for your opponent about 100/2 = 50ms. Interestingly, you will see your opponent die after about 50ms when you hear back from the server, but they will still think they’re alive for another 25ms (not 50ms) while they wait for a message from the server telling them they were shot. The reason it’s only 25ms longer before they know they’ve died is because the server sends a new message back once it calculates that they’ve died, games don’t just rely on a single packet of data at a time. See image below:

A breakdown of the same-time-shot.

At this point it can be deduced that to win with worse latency you need better reflex time. Typical human reflex time ranges from 150 to 300ms, so there’s a wide enough range to mitigate the effects for better skilled players. But at a competitive level where both sides are balanced it throws everything off. Let’s look at another situation now. If you have 100ms latency and your opponent has 50ms, you would want to get the shot off >=26ms before they do. That means:

0ms: you fire your shot
26ms: they fire their shot
50ms: your shot is received by the server, they die. Server sends a message back to both of you claiming the enemy died.
51ms: the server receives the enemy shot but discards it since they’re already dead.
75ms: The enemy finds out that they died.
100ms: You find out they died.

It’s funny that even though you got the kill, the enemy still has a 25ms heads up that they died before you do. This is still a slight disadvantage, as it now gives them that much more time to react and cause a chain of reactions with regard to what they communicate to their team. Also you spend another ~25ms shooting a dead corpse before realizing it’s dead while you could have been focusing on furthering your objectives.

These are very small numbers so it’s easy to disregard them, however if you take a constant 25ms lag over everyone else in the game for every message transaction between you and the server you will feel the difference more than you can describe it. It really adds up to an unfair advantage.

These prior scenarios took a simplistic case where one shot killed your opponent and you were both standing still. In a real game environment, compound all the latency delays with the fact that your opponent will be continuously moving, so every time you see them on your computer screen, that information will be some x milliseconds outdated. That’s why sometimes you think you shot someone or evaded something but end up missing or getting killed. This is commonly experienced by MMORPG players being hit in Area of Effect attacks even though it looks like they evaded them in time. The time it took for the information of the attack to be delivered to them didn’t leave them enough time to dodge the attack. Single player games or games played over a LAN don’t suffer from these issues, which is why tournaments for competitive eSports are often held in a LAN environment. A lot of games usually split up servers by zone on the world map: USWest, USEast, Asia, Europe, etc.. so that you can play people with similar latencies to yours.

While this article mainly covered ping and latency, there are many other aspects of networked games that may cause both advantages or disadvantages, and these are compounding effects. While most high end computers are glorified for the graphic capabilities, the benefits of top grade gaming gear surpasses mere looks — they truly deliver improved gaming experiences by shaving ms of lag away.

The last piece of information I would like to convey is that using a typical 60Hz monitor (at peak 60FPS) roughly translates to 16ms per frame. That means you will see one still image for every 16ms interval. With great eyes and if you’re paying close attention, humans can barely perceive a 10ms delay, but anything up to 16ms is usually acceptable for games and animation. Ping may be a big cause for disadvantages, but this is just a sample of ways to improve your gaming chops.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.