Skip to content

Instantly share code, notes, and snippets.

@nessus42
Last active April 19, 2024 21:39
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nessus42/f12f094e4abe30c0d00c9b4c86c387ce to your computer and use it in GitHub Desktop.
Save nessus42/f12f094e4abe30c0d00c9b4c86c387ce to your computer and use it in GitHub Desktop.
How Networking Works in Destiny 1 and How It Will Differ in Destiny 2 (According to Bungie, Redux)

How Networking Works in Destiny 1 and How It Will Differ in Destiny 2 (According to Bungie, Redux)

Additional articles in this series:

Intro

A few weeks ago I posted a detailed article on how networking works in Destiny 1 and 2, at least according to Bungie's official statements and their Game Developers Conference talk on the issue.

This post contains a significantly updated version of that article that I revised in order to (1) clarify issues that were left somewhat unclear in the original version, (2) to improve its overall structure, and (3) to address complaints about minor factual errors, etc.

More specifically, the new revision goes into some detail on what it means to have "dedicated servers" and why Bungie's implementation for Destiny 2 doesn't use them.

Since Destiny 1 is now near the end of its life, I hope to write a more distilled version of this article sometime soon that is tailored towards just Destiny 2.

Warning: This is a long post with lots of detail. If you don't have a significant chunk of time to read and absorb it and/or an obsessive interest in the topic as I do, just read the executive summary which is immediately below.

Executive Summary

In Destiny 1, there are three types of servers: mission servers, zone servers, and physics servers. The first two run in Bungie's server cloud, but the physics server (AKA the "Physics Host") runs on a player's console. I.e., it is basically the same sort of "P2P host" that has been used by many multiplayer console games for years.

The Physics Host runs on a console in order to save money, since Physics Hosts do a lot of work (a lot more than actually just "physics") and it would have been expensive for Bungie to operate hundreds of thousands of Physics Hosts. (The mission servers and zone servers require much less computing power than a Physics Host, and so operating these other servers was not too expensive for Bungie.) At the time that Destiny 1 was released, Bungie could not afford the financial risk of operating so many Physics Hosts.

In Destiny 2, the networking will be the same, except now all of the servers, including the Physics Host, will run in Bungie's server cloud. I.e., Bungie decided to spend the big bucks on Destiny 2 for it to have hundreds of thousands of virtual headless consoles running in their server cloud. I.e., no servers or "hosts" in Destiny 2 will be peers.

Despite the fact that all of the servers/hosts in Destiny 2 will be dedicated, PvP players who have been clamoring for "dedicated servers" may still end up being disappointed. In PvP jargon, the term "dedicated server" has a specialized meaning that means more than just having the server be dedicated, and Destiny 2's servers, dedicated though they may be, do not qualify as "dedicated servers" in the PvP jargon. For more precise details, you'll have to read more of this article.

The executive summary for this distinction is that in Destiny the servers are not fully authoritative. I.e., Destiny delegates the authority for each player's position to that player's console or PC. The reason for this is so that you will never ever experience self-rubberbanding in Destiny. For Bungie, no self-rubberbanding is one of their central design pillars, and so they've optimized their "netcode" for this design pillar at the cost of other considerations. For competitive PvP players, however, this design pillar of Bungie's is often asserted to be far less important than other game-play considerations.

For the typical player, however, having all the servers/hosts operated by Bungie should typically be a significant improvement for both PvP and for raids.

For other PvE game modes, it's not clear that this change will make much of a difference, since in Destiny 1, the other PvE modes usually played quite seamlessly anyway. (At least in my experience.)

Caveats

Every time I use the word "console" in this article, please infer this to mean "console or PC" when talking about Destiny 2.

All of my information in this article about how Destiny's networking works, comes from the following two official online Bungie publications, and this is my attempt to summarize them. To the extent that these sources are not correct, my write-up here may not be correct:

You can also watch "Shared World Shooter" as a video recording of Bungie's Game Developers Conference talk.

If you have reliable sources or evidence that this write-up is not accurate in some respect or another, please let me know and I will amend it.

Additionally, Bungie's documentation only indicates communication between consoles and servers. It does not indicate that there is any communication directly between consoles. (Other than between the consoles in a zone and the Physics Host for that zone, which in Destiny 1 runs on a console in the zone.) There are people, however, who claim to have monitored the network traffic to and from their console while playing Destiny, and they say that they see traffic between all the consoles in the zone, not just between consoles and servers. I.e., they claim that contra Bungie's implicit claims on the matter, there is P2P communication going on of some sort between all the consoles in a zone.

Here is a Reddit thread that discusses this issue.

I know of no documentation, however, on the nature of this P2P mesh traffic, or what it accomplishes. (I have my own pet theory, which I describe farther down in the article, assuming that there actually is P2P mesh traffic.) If anyone has any authoritative information about what is going on here, I'd very interested in hearing about it. Also note that it's quite possible that the putative P2P mesh traffic was measured while being the Physics Host. If that's the case here, then it does not actually indicate any P2P mesh traffic at all, and everything is just as expected.

FAQ

Instead of responding to the same questions a zillion times in the comments, I'll be maintaining a FAQ here.

Activity Hosts

In Destiny 1, there are servers that are dedicated to their task and that are not P2P - i.e., they are hosted by Bungie - but they only keep track of a small amount of very important information called "Mission Critical State". They also run "Activity Scripts", which do things like open doors when you shove a Tomb Husk in them, etc.

These servers, which are located in Bungie's server cloud, are called "Activity Hosts" and there are two kinds of Activity Hosts: "Bubble Activity Hosts" and "Mission Activity Hosts".

(Note: Bungie doesn't like to use the term "dedicated server" for these dedicated hosts. I'll explain why in a little while.)

A "Bubble" is Bungie's name for what people might typically call a "zone". A Bubble Activity Host keeps track of some important information about the state of a Bubble (i.e., a zone). For instance, how many adds there are in the Bubble. If there are plates that players can stand on to trigger certain events, the state of each plate is tracked by the Bubble Activity Host, etc.

A Mission Activity Host is like a Bubble Activity Host, only instead it keeps track of certain important information related to the progress of a "mission". E.g., a co-op story mission, a strike, a raid checkpoint, or a patrol mission, etc.

It is often the case that your console will be communicating with both a Bubble Activity Host and a Mission Activity Host. For instance, when you start the Vault of Glass, you start off in a public space that random players on Venus can wander through. They can even help you out if they want to, even though they are not participating in the raid.

For every player in that public Bubble, their console will be communicating with Destiny's Bubble Activity Host for that Bubble. For every player who is participating in the raid, their console will also be communicating with Destiny's Mission Activity Host that is responsible for tracking that part of their Vault of Glass mission. [See Footnote 1]

Physics Hosts

There is also a Physics Host for each Bubble. The Physics Host keeps most of the authoritative state for the Bubble. Or rather it keeps most of the authoritative state of all of the myriad little details about the Bubble that are not considered important enough to be stored on the Bubble Activity Host. (The Bubble Activity Host is more authoritative than the Physics Host for the information that it tracks.)

The Physics Host isn't really all that special. Everyone's console is doing exactly the same calculations that are being done by the Physics Host. The only difference is that if your console is not the Physics Host, its state is not authoritative. (Or rather your console is not authoritative about anything other than your character's location and some other information about your character.) If your console has a disagreement with the Physics Host about the state of the Bubble (with the aforementioned caveat), the Physics Host wins, and your console's Bubble is forced to reconcile itself eventually to the agreed upon "reality".

If the player whose console is running the Physics Host for a Bubble leaves that Bubble, the Bubble Activity Host will select a different console in that Bubble to be the new Physics Host. When this happens, the new Physics host will immediately need to reconcile with its Activity Hosts, which are considered authoritative about the information that they track.

When a reconcile happens between the new Physics Host and its Activity Hosts, they may not agree on certain things. They might not even agree on how many adds are alive in the Bubble, for instance. If the new Physics Host has more adds in it than are in the Bubble Activity Host, then some of the adds on the new Physics Hosts will suddenly drop dead. If the new Physics Host has fewer adds than are on the Activity Hosts, then the new Physics Host will spawn new adds. Etc.

Every other console in the Bubble will now be forced to reconcile its state with the new Physics Host. This process of Physics Host migration typically happens seamlessly without you ever noticing, and in public Bubbles, it tends to happen very frequently. [See Footnote 2]

One bit of voodoo that I'd like to dispel here, now that you understand Destiny's networking model, is that changing the fireteam leader does not have any effect on who is the host. Changing the fireteam leader is voodoo.

Going to orbit from a raid and back into the raid, however is not voodoo. When you do this, you will likely end up with a different Mission Host, and you may have a better connection to the new Mission Host or end up connected to a more lightly loaded Mission Host.

Some people say, however, that you can control to some degree who the Physics Host is in a raid, for instance. If one player enters the raid first, his console will of course be the Physics Host for the raid while he is the only player in the raid, since his console is the only console in the raid Bubble. If other players then join on him, there are people who claim that this player will remain as the Physics Host.

It's not clear from Destiny's official articles on the topic if it's actually the case that you can rely on the Physics Host remaining the same for any significant period of time. There are certainly circumstances that would cause the Physics Host to change, but it's not clear just what those circumstances are. Except if the player who is on the Physics Host leaves the raid. Then, of course, someone else's console will become the Physics Host. (A number of correspondents have claimed that wiping causes a new Physics Host to be chosen. If true, then forcing the Physics Host for a Heroic Mode raid would seem to be impossible.)

It was using this technique (having one person enter the raid first and then having everyone join on him or her) that allowed, I am told, players to exploit Crota back in the day by disconnecting the Physics Host's network cable. Whether or not you can rely on the Physics Host remaining the same for a long period of time using this technique, you could apparently kill Crota quickly enough most of the time, however, that there wasn't enough time for a Physics Host migration to occur before unplugging the network cable.

Whither Dedicated Servers?

Bungie has stated in the previously cited article This Week At Bungie – 05/25/2017 that they are not implementing "dedicated servers". But it sure seems that they have dedicated servers! For each player there is a Bubble Activity Host, a Mission Activity Host, and a Physics Host dedicated to just them (and the other members of their fireteam and Bubble.) That sure sounds as if they have dedicated servers. In fact, it sound as if they have three of them for each mission that you engage in!

In the face of this, why does Bungie insist that they are not using dedicated servers? The answer to this question is given by the fact that the term "dedicated server" is used in the FPS PvP community in a jargony manner. In this jargon, the term "dedicated server" does not mean a server that happens to be dedicated. Instead, it means a server that is dedicated and which also keeps all of the authoritative game-state. If there is authoritative game state that is kept on each console, for instance, rather than on the server, then the server does not count as a "dedicated server", using this PvP community jargon, no matter now dedicated the server might actually be.

You might recall from above that I stated, "your console is not authoritative about anything other than your character's location and some other information about your character."

It is this fact - that each console is authoritative about its character's position and other information about the character - that makes Destiny 2's new dedicated Physics Host not a "dedicated server".

Why did Bungie take this approach and consequently risk the ire of all Destiny PvP diehards who have been clamoring for dedicated servers in Destiny? Bungie answered this question in both of the Bungie sources I cited above. I'll quote here from the more recent source:

The server is authoritative over how the game progresses, and each player is authoritative over their own movement and abilities. This allows us to give players the feeling of immediacy in all their moving and shooting – no matter where they live and no matter whom they choose to play with.

The reason that Bungie has each player's position be authoritative on their console rather than on the Physics Host is so that you will you never experience "self-rubberbanding". Self-rubberbanding is what happens when there's enough lag between your console and the dedicated server that your console and the server end up disagreeing about where you are located. When this happens, a "dedicated server" will work to correct your position. From your point of view, depending how the game is implemented, your character will teleport back to where it was moment ago. Or maybe even to someplace random-seeming if the server is doing some sort of fancy server-side prediction of your movements. Or instead of teleporting you, the server might correct your character's position by pulling on it with what would seem to be a giant invisible rubberband.

You would never experience self-rubberbanding in a single-player game, and Bungie decided that you should never experience it in Destiny.

Many hardcore PvP players will point out that self-rubberbanding only happens if you don't have a good a connection to a server. That if you do have a good connection to a server, then you will rarely, if ever, experience self-rubberbanding.

If you Google around, however, you will see that for virtually every PvP FPS game out there that uses "dedicated servers", you will find plenty of people complaining about not being able to get a good enough connection to a server for that game, and that the self-rubberbanding is driving them crazy.

Bungie wants you to never experience self-rubberbanding in Destiny, and in Destiny you will never, ever experience self-rubberbanding. In fact, it is one of their central design pillars, which is documented in their "Shared World Shooter" GDC presentation that I linked to above. You may experience other lag artifacts: like other players teleporting around or rubberbanding. But you will never experience self-rubberbanding. I have played Destiny for more than 2,000 hours and I have never experienced self-rubberbanding. Not for a single second.

As Bungie said, as I quote above: "This allows us to give players the feeling of immediacy in all their moving and shooting – no matter where they live and no matter whom they choose to play with."

Bungie has another design pillar: You should be able to play Destiny with whomever you want to, no matter where they are located in the world. These two design pillars force Bungie to make the player-position be client-side authoritative.

Unless Bungie weakens at least one of these two design pillars, these requirements force Destiny networking to be the way that it is, despite the fact that the downsides of this approach will not be popular in some PvP circles.

Another design pillar of Bungie's that prevents them using "dedicated servers" is that they never want you taken out of the game-world while playing Destiny. For instance, let's say that you have just completed a raid with a globally distributed team, and you decide that now you'd like to play a few rounds of Crucible. When the fireteam leader goes to select the Crucible mode, if there were dedicated servers, Destiny would either have to (1) tell the fireteam leader to kick some of the players from the party due to their real-world geographical locations, or (2) it could force the fireteam leader to select a real-world geographical region to play in. The fireteam leader would then have to make an explicit decision to favor some members of their fireteam while hurting others based on their real-world locations.

For better or for worse, taking you out of the game-world in this manner is anathema to Bungie's sense of game design.

Bungie's approach has pros and cons. The pros being what I and Bungie just said: (1) You won't experience self-rubberbanding, no matter where you live, no matter how far away you are from Bungie's servers, no matter whom you chose to play with, and no matter how poor your Internet connection is. E.g., I sometimes play on a fireteam with Australians, who live on the opposite side of the planet from me, and yet I never suffer from self-rubberbanding. (2) And you won't to have to kick fireteam members before playing PvP, or decide who to favor and who to hurt. You won't be taken out of the Destiny world and into the real world via the Destiny interface.

The downside of Bungie's approach is that players can cheat with lag switches, and also that when you play with players who have high-latency or lossy connections to the Physics Host (or if you have a high-latency or lossy connection to the Physics Host yourself), you will see other players teleport around the map. For these reasons, it's quite possible that many hardcore PvP players will never be happy with Destiny's PvP "netcode".

The Past, The Present, and Destiny

Let's take a little break from the current day to discuss some of the history of FPS networking.

(For this section of this article go here.)

But What about Cheating?

Counter Strike: Global Offense is by far the #1 FPS e-sport game being played today, by dollars earned, and has been so for a number of years. [Source] They care a lot about cheating. Consequently, they went in the opposite direction that Destiny did. Their servers use a more pure client/server model. (Though CS:GO certainly does both client and server-side prediction, so its networking model doesn't at all have the sluggishness of a pure client/server model.) With CS:GO, the server is also completely authoritative about everything. [Source]

The difference between these models means that in Counter Strike, a player suffering lag is always at a disadvantage to a player who has a fast connection. This is what Valve has to say about their "dedicated server" model:

Network latencies and lag compensation can create paradoxes that seem illogical compared to the real world. For example, you can be hit by an attacker you can't even see anymore because you already took cover. What happened is that the server moved your player hitboxes back in time, where you were still exposed to your attacker. This inconsistency problem can't be solved in general because of the relatively slow packet speeds.

In the case described by Valve for Counter Strike, the player suffering lag is able to be hit, even though they are behind cover from their point of view, because according to the server, which is taken to be authoritative, they are not yet behind cover.

Destiny PvP, on the other hand, is not an e-sport at all. (At least not if you measure this by money earned by professional players.) Consequently, Destiny doesn't care as much about cheating. In Destiny PvP a player with lag is sometimes at an advantage, rather than at a disadvantage. The reason for this is that in Destiny, a player's console is authoritative about the player's location, rather than the Physics Host being authoritative about this. (We should note here that even though a player suffering from serious lag might sometimes gain an advantage in PvP, they will always be at a net disadvantage, since from their point of view, everyone else will be teleporting around the map. The only exception to this is someone who is cheating using a lag-switch, since they can control when they experience lag, to what degree, and for how long.)

When another player's console is authoritative about their position, but their position is being relayed to your console with significant lag or lost packets, they may seem stuck in a certain location for a while and then "miraculously" teleport behind you and shoot you in the back.

From their point of view, which is considered to be authoritative, they just walked around you and shot you in the back. But because the packets detailing their travel path from being in front of you to being behind you, did not make it to your console, your console can't render this movement, and instead can only render an apparent sudden change in location.

This vulnerability in Destiny's networking model is why "lag switches" work in Destiny. These are just simple mechanical switches that let a player disconnect their out-bound network wires for a short period of time, without disconnecting the in-bound network wires. Consequently, their console will still be informed of your movements, while your console is not being informed of theirs, until they are suddenly behind you with a gun to your head.

So, there's a clear trade-off here. You can have immediate, authoritative, responsiveness about your position in the Bubble (like in a single-player FPS) but which allows for certain forms of cheating and for potentially glitchy rendering of other players in the face of lag, or you can have an unreliable and potentially glitchy rendering of your own position in the Bubble when you yourself are suffering from serious lag, but which prevents certain kinds of cheating. You can't have both.

For better or for worse, Bungie chose the former. For PvE, this is the clearly superior approach, since AI opponents are not going to cheat. For "casual" PvP, the best approach is debatable. But at least in my opinion, what's unique about Destiny is its PvE experience, and if they have to make design trade-offs between better PvE or better PvP, they should always prioritize their PvE experience.

One might argue, considering the different requirements of PvE and PvP, that Bungie should have implemented different networking models for PvE and PvP. Fair enough; perhaps they should have. The two salient counter-argument to this are that (1) everything that Bungie does has to be done with a given budget and an aggressive schedule, and the more complicated Bungie makes one thing, the fewer resources they will have to devote to other things. I.e., the more effort they spend on their networking code, the fewer resources they will have to develop content. Content like better missions, strikes, and raids. So, what would you rather have in Destiny? More PvE content? Or a PvP experience that is more like Counter Strike? And if the latter is the case, perhaps playing Counter Strike is really what you should be doing. (And if you get really, really, really good at Counter Strike PvP, you could make more than $350k in a year doing so professionally!)

Also, (2) as mentioned above, Bungie made a game-play design trade-off: I.e., Bungie decided that it was more important for Destiny that people be able to play on globally distributed teams (i.e., teams made up of members that you’ve met playing PvE), despite the teleporting issues that this causes, rather than providing an e-sport grade PvP experience, which typically requires dividing the world up into distinct server areas that can’t play with each other.

There are those who claim that the first argument I just made above is weak. That more resources dedicated to PvP doesn't mean that fewer resources will be dedicated to PvE. People who make such claims are probably not software engineers, as I am. They have probably never read The Mythical Man-Month. This book is generally considered required reading for those who want to understand how engineering of large software systems works. You can't just solve many problems by throwing more manpower at them. That doesn't work in the real world of software development of complex systems.

Or, if you don't believe me, you might believe Valve's CEO and co-founder, who says:

If you are involved in a game, everything ends up being a set of trade-offs. Anything in a game is a sacrifice of things not in the game.

Or you can chose to believe that Bungie, Valve, and I are all full of shit. That's your right.

Note: It also may very well be the case that Bungie does have some differences in the networking implementations for PvE and PvP that are appropriate for the two different modes of play. But we probably all know from personal experience that Bungie's PvP networking implementation is prone to lag exploits and/or giving unfortunate glitchy advantages sometimes to players suffering from lag, so whatever these differences might be, it is almost certainly the case that the PvP and PvE networking implementations share a large common core.

One should also note that Counter Strike is not immune from cheating either. A form of cheating that is common in the Counter Strike world is the use of "aimbots". These are mods that a perpetrator installs on their PC that does the aiming for them. An aimbot can aim much faster and more accurately than almost any human.

Valve has software to detect this form of cheating, and if a perpetrator is caught, they will be banned from many Counter Strike servers. Entire respected CS:GO teams have had to disband at times because one team member was caught with an aimbot installed on his PC. The software to detect this type of cheating is not perfect, however, and so it still happens frequently. Or so I am told by some who claim to be deep experts in the state of the art on competitive FPS PvP gaming.

TLDR: If Bungie implemented a "dedicated server" model for PvP a la Counter Strike, it wouldn't completely eliminate cheating, nor necessarily result in a profoundly better PvP experience for the average Destiny player, who is likely connected to the Internet via WiFi and a cheap DSL service.

Players who can't get a good connection to a Counter Strike server, or who suffer from various cheats, also complain bitterly at times. But players who take Counter Strike very seriously, will often go to great efforts to make sure that they have a high-quality Internet connection to Counter Strike servers. Such people will then tend to have a robust PvP experience (modulo aimbot cheating) that Destiny cannot guarantee because with Destiny, even if your Internet connection is great, you will see players with very bad Internet connections, or who are geographically far away, teleporting around the map.

If WoW Can Do Huge Zones, Why Can't Destiny?

So some naysayers may point out at this point, that World of Warcraft (and games like it) supports huge zones with hundreds of players in them at any given time. If WoW can do this, why can't Destiny? It was sort of sold as an MMO. It should be more MMO-like, and have huge MMO-like zones.

Well, basically I've already answered this question. WoW is implemented using something akin to a pure client/server model, while Destiny is not. WoW doesn't have the snappy, visceral response time of a single-player first-person shooter. Maybe you haven't noticed this, however, because the game-play styles are very different. In WoW, you don't have guns that shoot 15 bullets per second. You're not wearing a jet-pack that lets you jump in the air while turning and bouncing off of other players, while shooting machine guns at the same time.

In WoW, you generally don't have to aim. You select a target, and then all your subsequent spells will be automatically directed at this target. When you cast a spell, it's not an assault rifle spitting out many rounds per second. Instead, maybe you cast a lightning bolt. When you do so, you wave your hands dramatically for a second and then a lightning bolt shoots out of your hand to the pre-selected target. If that lightning bolt is delayed by a quarter or half of a second, no one is ever going to notice.

The game-play styles are different enough that the technology required to implement them convincingly is also quite different.

I'm not aware of any multiplayer first-person shooters with huge WoW-sized zones that perform acceptably on a console.

Planetside 2, which is an FPS, actually does have very large zones. Planetside is an interesting case because it uses networking techniques that are almost exactly the opposite of how a game like WoW works to achieve huge zones. Unfortunately, Planetside 2 performs terribly on consoles. So Destiny apparently could also not use a Planetside-like networking model.

Even games like Counter Strike that have "dedicated servers" as discussed above, require that every client simulate much or all of the physics that the server does. They are implemented this way for the sake of responsiveness, just like with Destiny, and so they suffer from similar limitations that Destiny does in this regard.

Of course each multiplayer FPS game may support zones of different sizes and different degrees of complexity. Each game may also support a different maximum number of concurrent players within a zone, depending on the design trade-offs made by each game implementation. E.g., how much of their computing power do they wish to dedicate to visual bling as opposed to other considerations. But no console FPS game, that I am aware of, supports with adequate performance the truly huge zones that many MMORPGs do.

Destiny 2 Does Away with P2P?

So, what is changing between Destiny 1 and Destiny 2 in terms of networking?

Well not much at all, really... And yet something really big at the same time: Everything is going to work the same as before, except that now the Physics Host for a Bubble is no longer going to be a randomly-selected console in the Bubble. In Destiny 2, there's no more migrating P2P "host". The Physics Host will always be located in Bungie's server cloud.

In order to keep the visceral snappiness of a single-player FPS game, however, each console will still be doing all of its own physics simulation for an entire Bubble all of the time, and each console will be authoritative about its player's position in the Bubble. And just like with Destiny 1, each console will still be periodically reconciling with the Physics Host. The only difference is that now the Physics Host for a Bubble will always be a server dedicated for this purpose living in Bungie's server cloud, rather than running on a random console in the Bubble.

So, effectively this means that Bungie has implemented servers that are dedicated, but Bungie prefers not to use the term "dedicated server" for their particular type of networking because the dedicated Physics Host is not authoritative about the players' positions.

Caveat: It's quite likely that Bungie has made other networking tweaks that they haven't told us about. They might be tweaking the network code with every patch, for all we know! Also, please recall from some discussion above that Destiny may do more P2P mesh networking than Bungie has described. In fact, all the evidence does suggest that Bungie uses a P2P mesh for broadcasting all of the players' positions in a Bubble to all of the other players in the Bubble.

One reason that Bungie might be doing P2P mesh networking - if indeed they are - despite all the "hosts" being dedicated hosts that live in Bungie's server cloud, is so that information about the authoritative location of each player is transmitted more quickly to each console, rather than having updates about players' locations being delayed by having to be routed through and processed by the dedicated Physics Host.

Furthermore, if we consider what needs to happen during a host migration in Destiny 1, it seems that there would need to be P2P mesh traffic (or some other non-host/client solution) at least for the duration of the migration.

Consider for a moment what happens in most games that have P2P hosts when a host migration occurs. The game stops for a while and you see a message saying something like "Host migration in process. Please wait." This never happens in Destiny. Host migrations are "seamless". What this means, is that the game continues for a while, even when there is no host, and then loose ends are fixed up after the migration has occurred.

During the time that a host migration is occurring, if there were no P2P traffic that bypasses the host during at least this time period, what would happen? First of all, we would receive no updates about the locations of other players, and consequently, every other player would appear to be frozen in place. This never happens with Destiny. Consequently, we can conclude from first principles that for Destiny 1, at least, players's positions are not broadcast at all times purely through the Physics Host.

Conclusions

It may very well be the case that the networking implementation in Destiny is not the Last Word in first person shooter networking technology. But especially for snappy and seamless cooperative FPS PvE play, it is unparalleled in my experience in providing a game-play experience that rivals the immediacy of a single-player shooter.

I hope that this article has shed some light on how Bungie has been able to accomplish this, and why they have made some of the trade-offs that they have.

I know that in many people's minds, one of their biggest complaints has been lag artifacts in PvP play. And also sometimes at very inopportune moments in PvE raids. (Usually, for example, while just on the verge of trying to detonate sixteen bombs simultaneously, or making that final discharge and slam needed for the Aksis challenge mode win.)

By moving the Physics Hosts into Bungie's server cloud, and thus eliminating the dependency on, for instance, a flaky wifi connection for a Crucible Physics Host or a raid Physics Host, hopefully we will suffer significantly less frustration caused by these poor connections as we rescue the remains of Humanity from the continued and unrelenting onslaught of the forces of Darkness evil.

("Serious", "competitive" PvP players on the other hand, are likely to still have CS:GO Steam coming out of their ears over Bungie's putative "ineptitude" and/or "penny-pinching" ways.)

@shiversoftdev
Copy link

Beautiful

@nessus42
Copy link
Author

Thanks!

@JonEast87
Copy link

Wow this was an awesome write up! Me and my friends have always been curious how exactly to explain or understand Bungie's backend system for D2. This helped a lot!

@nessus42
Copy link
Author

I'm glad you enjoyed it! It was fun to learn all that stuff and write it all up. It took a lot of effort, but what things in life that are worth doing, don't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment