Skip to main content

How Destiny 2 works

Matchmaking magic

This is The Mechanic, where Alex Wiltshire invites developers to discuss the difficult journeys they’ve taken to make their games. This time, Destiny 2 [official site].

When you go down to Destiny 2’s European Dead Zone, you’ll blast your way through crowds of the Fallen and run past other players. Perhaps you’ll also have a friend by your side as you stumble across Public Events and start Adventures, the action naturally flowing as you freely explore. Of course you do! Destiny 2 is an online shooter, and online shooters do this kind of thing.

But the years of work that went into creating the technology that runs it proves that Destiny 2 is no ordinary shooter. It’s product of Bungie’s ambition to meld the rich social bustle and scale of the MMO with the twitch-precision of the FPS, and, frankly, it seems a miracle that it works at all. Destiny 2’s PvE multiplayer is a crazy and surprising melding of design and technology, and this is how it works.

So as you’re running around the EDZ, little do you know it but every few minutes you’re migrating between matches consisting of up to nine players. “It’s almost never something that players see, but it’s a pretty complicated thing happening under the hood,” says Justin Truman, who as an engineering lead and design director has spent the past eight years helping to build the architecture on which the Destiny series runs.

Each of these matches is situated in a distinct space in the world. If you’re a Destiny player, you’ll immediately recognise them: they’re the rooms and open spaces in which you play, and Bungie calls them bubbles or zones. They’re joined together by transitional corridors, caverns and ravines, which each feature a little kink so you can’t see through them from one zone to the next. And it’s in these transitional spaces that the magic happens.

The reason why Destiny 2’s worlds are split into these ‘autonomous units of matchmaking’, as Truman puts them, rather than simply taking place in open areas like any MMO, is down to Bungie’s original goals for the first Destiny. They wanted to make a great action game with the immediacy of a singleplayer shooter. They wanted you to constantly bump into other players. They wanted you to always be able to play with your friends. And they wanted all the matchmaking to happen seamlessly and in the background so you never think about it.

MMOs can generally accomplish a lot of those goals, but they can’t run with the high-fidelity responsiveness and detail of a Halo or COD. And Halo or COD can’t seamlessly allow you to traverse large worlds with lots of other players. “It was a big design challenge and we didn’t know exactly how it should work, and we also didn’t know what tech would enable it,” Truman says. “It was an exciting process.”

As an example of what the team grappled with in the early days of planning Destiny, one of the early ideas was to put a bubble around each player that they’d matchmake into. But that immediately invited questions: what you do with line of sight if someone’s really far away? Can you see them? Are they in some other matchmaking field?

They settled on zones, but the big challenge was how players would be transported between them. The answer was to do a lot of predicting. When you’re running through a zone, Destiny 2 tries to figure out what zone you’re about to go to, and when you start to get close to its transition space, that corridor between zones, the game starts to silently spin up the matchmaking process. You might still be fighting - you might even end up running the other way - but Destiny 2 wants to be ready for when you enter the transition so you’ll be able to smoothly exit it into a new zone, with new players.

“If you start booking it through that transition to the next zone, we have a drop-dead point in the middle where you can’t see the new zone yet, a physical line in the world where we have to have decided what zone you’re transitioning into,” says Truman. “We wait until pretty close to that point to see if we can find a match, and if we can’t, we abort and we let the server spin up a brand-new zone for you.”

And if you’re even faster than that, usually only possible when you’re going full-speed on a Sparrow hover bike, that’s when the whole world can freeze for a few seconds. It’s because the server hasn’t had time to complete setting up your new zone before you need it.

Though it happens behind the scenes and you’re largely unaware of it, Destiny 2’s PvE matchmaking is more complicated than most other games. Part of the reason is that the game is both being hosted on a host player’s PC, which is running the close simulation of the gunplay and physics in the zone, and also on the game’s servers, which is running the broader picture, running events and scripting.

The other part of the reason is that the game always leaves space for other members of your party, or in Destiny-words, Fireteam. It doesn’t matter where everyone is across the world, the game always ensures you’ll be together when you’re occupying the same space.

“But you’ll see if you run side-by-side through a transition with a Fireteam mate, you’ll see them briefly disappearing and then spawning back in,” says Truman. In this moment, the artifice shows, a moment that reveals what’s really happening when you play Destiny 2. When you cross the threshold between your previous zone and migrate into a new one, the game running on your PC has to re-instantiate every object, including your friend, causing them to briefly blink out of existence.

destiny-2-pc-issues

“There are little artefacts that you can see, but I feel pretty good about where we landed, about how much we polished it for your local experience,” says Truman. “But one thing we really worried about and debated is what those transitions would do to the pacing of the game.” When you’re in a transition between zones, the game can’t give you anything to do, like a chest to open or enemies to shoot. All you can really do is to continue running forward.

When they were making the first Destiny game, which works the same way, the team wondered if players would find it weird to experience three minutes of free-wheeling action in a zone and then 20 seconds of silence, followed by another three minutes of action and 20 seconds of silence.

Some of the quiet is covered by the game playing dialogue, but ultimately the pacing simply feels like Destiny. “You can have an intense encounter and then the transition feels like a palate cleanser,” says Truman. “It’s one of those things where you have an idea for what you want the game to be and then you build a bunch of systems and technology that achieves your vision, and then after a while you’ve made enough decisions that the tail is wagging the dog. I don’t mean that in a bad way; we get to a place where the decisions you made define what Destiny is.”

Not all zones are alike. Some are public, featuring strangers running around, while others are private, so the only other players will be members of your Fireteam. “I feel like all the interesting design decisions are about the tension between two different things that you really want,” Truman says. Destiny 2’s design team wanted intense and tightly scripted action for a party to play through, and they also wanted lots of other players running around, but the two desires don’t exactly mesh well, because reserving matchmaking slots for the party means that the game can’t leave space for strangers, and having lots of strangers shooting aliens will interfere with scripted encounters.

Destiny 2’s solution is to divide the world into spaces which are focused on one or the other of these ideals, so as you run from one side of it to the other, you’ll experience both. ”In a private space we can use exactly the right music and have a jump scare and the boss can show up and take four minutes to kill; you can craft all of that and tune the difficulty, whereas in a public space you might show up and someone else has already summoned the boss and he’s at 20% health with six players hammering on it so it’s really easy. That’s cool, because it creates the immersion of social events and mechanics, but it’s a different type of cool than the canned, designed experience.”

That tension hints at other challenges in creating open spaces for strangers to play together. Destiny 2’s zones can handle up to 30 AI and aim for six players, but can go up to nine (“After that you start running out of memory and objects start disappearing from the world and stuff like that”). But while 30 AI sounds like a lot, it can feel sparse when scattered across some of Destiny 2’s zones, especially in the EDZ, which features the biggest in the game.

“We can make a space feel more dense by paying attention to where the player is and then spawn AI near them so there might be 100 possible AI but there are always 30 in front of you,” says Truman. “That works great if you’re the only person in the bubble, but if there are other strangers there there might be someone all the way in the opposite corner of the bubble, taking up most of the AI.”

Truman says that over time, the team has largely fixed this issue, but it can still happen if a player should trigger an Adventure, a scripted event which takes place in public areas, at the same time as a Public Event kicks off, during which waves of enemies and a boss appear. “So if you’re standing somewhere else, you’re probably not seeing any enemies.” One of the key solutions is social: the game calls out where the event’s happening in the hope that players will gravitate towards it, since it’s where the exciting stuff is.

Solutions like this go hand-in-hand with the high technology that runs Destiny 2. Even its most complex engineering achievements are inseparable from design, the soft stuff that makes the hard architecture that Truman and his team built make sense. It helps a set of smartly configured multiplayer rooms coalesce into a world.

Read this next