Why in online games ping of 100 is stuttery but stable yet crossing line of 150 just produces unpredictable outcomes like characters teleporting?

146 views

[ad_1]

Why in online games ping of 100 is stuttery but stable yet crossing line of 150 just produces unpredictable outcomes like characters teleporting?

In: Technology
[ad_2]

Ping is like an echo. The time it takes for you to send a small piece of information, for it to reach the destination and for the destination to respond back. The higher the ping, in milliseconds, the longer it took for the other side to receive the bit of information and the response to get back to you.

Many things effect the response time (ping), your local network, internet connection speed, and the physical distance between you and the device you’re pinging, likely a game server in this instance. If you’re in the Uk and the game server is in Australia, then the small piece of information has a large physical distance to cover. So ping will be high. To you, you game is stuttering because the game server is running in real time, but your only getting updates every 150ms. Sounds as though 150ms is just too high for the game to be stable

Character teleporting is usually due to updates to your side that were preformed since you last got their position from the server last.

Because the specific games that you’re thinking of switch to extrapolating target behaviour somewhere between 100 and 150ms (or possibly slightly before 100ms but the corrections are too small for you to notice).

Other games are designed around an assumption of higher latency, and so won’t experience teleporting until your ping is in the thousands, but at the cost of you seeing other players (and other players seeing you) at wherever they (and you) were more than a second in the past.

In an MMO where there’s a 1.5 second global cooldown between any two actions and all abilities home in on their target automatically, this isn’t that big a deal, but in first person shooters it can result in a worse experience than an occasional bit of visible extrapolation corrections.

This has to do with how the game processes things when it doesn’t hear from the server for awhile.

The game server is the ultimate authority on what the state of the game is. Your console or computer may try to update it’s idea of what’s going on in the game even when it doesn’t hear from the server. When it does hear back, your computer has to update the game to match what the server says, even if it doesn’t make sense.

Imagine you are fighting a boss and the boss charges at you, and then your computer stops receiving messages from the server for half a second. During that time, another player hits the boss, but your computer didn’t know about that because it missed the server message.

Your computer thinks the boss continued charging forwards, but the server decided that the boss got stunned by the other player’s attack. When the server finally gets back to your computer, it seems that the boss teleports! This is just one example of how things could go wrong when the server can’t reach your computer for even half a second. There are many many possibilities.

Generally the basis this question relies on doesn’t apply.

There is neither a particular line at 150ms nor is the behaviour necessarily unpredictable. It simply depends on the implementation of the game the user is playing.

Ping, or latency, is simply the round-trip-time of a signal. This means a small packet of data is sent to the server, then back to you and that time is measured. So it is a two-way protocol.

Assume a very simplified scenario: We have a game with two players connected. The server receives the position of the players and broadcasts it to all other players.

Let’s say the players have a latency of 10ms each, thus player A sends his position to the server in 5ms and player B receives the new position 5ms later for a total of 10ms. This would be well within the realm of displaying it in real-time at above 60fps. (because it is lower than 1/60 = 16.66ms)

Now lets say player A has a ping of 100ms, the signal reaches the server in 50ms, then the server sends it to player B who receives it 5ms later for a total of 55ms. This now would be barely above 18fps (1/0.055 = 18.18).

For this very reason games don’t just render stuff in real time. Instead they “guess” (extrapolate) behaviour that is likely to continue.

So for instance player A last moved from west to east, thus it is likely for him to continue moving in that direction. So the server could for instance send a position, velocity and direction to player B. Player B then renders this movement at the best possible frame rate.

As long as player A actually continues moving from west to east player B will have no signs of lag (assuming the server takes latency into account under these ideal lab conditions) because the update matches the prediction. However if player A suddenly stopped moving, then this change will only arrive in about 55ms, as we’ve said earlier. But player B already rendered the position of player A to be farther in the east, the update results in a “snap back” to the actual position. Thus you have “rubber-banding” in games.

This effect obviously gets more pronunced the more the prediction differs from the actual behaviour.

However, as you can see, this form of behaviour is absolutely not unpredictable. We knew beforehand that player A would snap back in this scenario because the position player B was prediction turned out to be wrong.

One can also see that the impact heavily depends on how “real-time” the game has to be. In MMOs where you’re capable of queuing spells and have long casting times this isn’t as crucial. Also imagine online Chess, you could easily have hour long delays between moves and still couldn’t tell a difference between a conscious delay and a delay because of latency. (unless you play chess with a timer, obviously) Simply because moves in Chess don’t have to be done in real-time as it is a turn-based strategy game.

For this reason people will be able to play Chess (without timer) with their friends on Mars in the future, but won’t be able to play even the slowest real-time MMO. (because Mars is on average 12.6 light minutes from Earth)