Quantcast
Channel: Understanding Destiny networking & why packet loss, not latency is the games biggest killer. : DestinyTheGame
Viewing all articles
Browse latest Browse all 146

Understanding Destiny networking & why packet loss, not latency is the games biggest killer.

$
0
0

This will be mostly focused on Crucible, but to a smaller degree it also affects PvE as well. Also, it's heavily simplified, there's a lot developers can, and do to mitigate the things I talk about here.

Okay, let's get some basics out of the way.

  1. Destiny is a Peer to Peer multiplayer game.
  2. Destiny uses UDP for the Peer to Peer communication.
  3. UDP is (by design) lightweight, but heavily influenced by network "stuff".
  4. Destiny operates on a 10hz Tick, that is, clients send updates 10 times per second, or every 100ms.
  5. Latency can to a small degree, be compensated for, packet loss not so much.

What the hell does that all mean, and why is it important?

Okay, so during a crucible game, as you're running around, and everyone else is running around, what you're seeing is the game itself "animating" everything for you. If you've ever done any kind of computer animation you will know what "interpolation" is, whereby you draw two points in the X.Y.Z space, and the computer fills the gaps between those two points.

Destiny does the same thing, as you're watching another player, you're seeing their running animation, but their actual position in "reality" only updates every 100ms.

Why is this a bad thing?

Well, it's not for the most part, and in 90% of cases it's quite an effective compromise between network load (more ticks more often requires more bandwidth) and a reliable player indication for game play.

Okay, so why did you bring it up?

Packet loss. If you see strange player behaviour, such as a player running against a wall, or a teleporting player that was running in one direction, then skips somewhere else, this is the result of packet loss.

If a tick (client update) is lost due to packet loss, then that players position, and what they're doing doesn't reach the other players. On their console, they're doing something (running, turning, jumping, shooting, etc) but nobody knows, until their next tick is received. In this way you're shooting someone and then half a second later they're behind you and killing you.

Incidentally, this is exactly what lag switching is, it's intentionally created packet loss to gain advantage, but being player controlled if they cut the packets before they die, and on their end manoeuvre themselves to an advantageous position then let the packets through again, they can avoid death and get the kill.

So how do I spot packet loss?

If you're in a game of Crucible and only one player is doing the teleporting and glitching, then that player is the one who has packet loss. If however, everyone is teleporting then it's more likely that you're the one that is experiencing packet loss. Also red bars, red bars are almost guaranteed players with packet loss.

What causes packet loss?

Lots of things, the leading cause is a congested internet connection. UDP is connectionless, that is, the data is simply sent without any controls in place to ensure others receive it, so when your connection is congested, then it's more likely that your Destiny game ticks are being lost because other network traffic will likely have a higher chance of getting through (such as TCP traffic).

Less likely, but still possible, is congestion at your ISP level, and their points of interconnect. So, the internet works on a series of routers. If you imagine your internet connection as a street, then where streets meet you have an intersection with stop lights etc. Those intersections are routers, and they too stop traffic and let it through directing stuff where to go. If those intersections (routers) are overloaded, then the routers will begin dropping traffic.

How do I prevent packet loss?

Simple, when playing ensure that (wherever you have control) prevent people from using all your bandwidth. If you're a kid and your parents and siblings are all watching Netflix you could be shit out of luck, but at least you will know why everyone is teleporting. The other thing is to upgrade your connection. If you're on a slower internet connection and a faster one is available that will help a lot.

Okay, so I was shooting this guy and was winning, then he stopped taking damage and I died, WTF M8!!!"

This is where time to kill and other factors are affected by packet loss. Remember the tick rate, most weapons will have a time to kill that involve multiple ticks, some weapons have an insane time to kill when effectively used (last word, lord of wolves) and in those cases, packet loss will definitely lead to many WTF moments, especially if you think you managed to get out of the way.

So which is better, a faster tick rate, or dedicated servers?

In a perfect world both are the best. A faster tick rate will provide better client interaction leading to less chances of teleporting/weirdness. Dedicated servers can be coded to compensate for packet loss by handling interaction server side, meaning players who are experiencing packet loss will have a "Bad Time™" because the server knew that the other player killed the player experiencing packet loss (not the other way around as it is now). Bungie implemented damage arbitration, which is their method of compensating for packet loss, and it's sometimes okay, but far from perfect.

Doesn't latency influence the tick rate?

Latency is a constant, therefore in game latency can be compensated for (connection tracking) the main thing latency influences is who shot first, and most quality multiplayer games will "elasticise" the client experience to hide latency effects. However extremely high latency (300ms+) is much harder to hide and can become quite visible, such as a player running at you, you shoot/kill them and they die half a second later, conversely those insane times to kill where you're full health then dead instantly from a pulse rifle.


So there you go, a very simplified explanation of Destiny networking, I hope it helps people understand in game behaviour more and gives people a better idea of what went wrong and why (and how to fix it maybe even).

submitted by /u/Xesyliad
[link] [comments]

Viewing all articles
Browse latest Browse all 146

Latest Images

Trending Articles



Latest Images