Imagine you’re playing a mission you’ve played countless times before. You know it well enough that you can do it almost on autopilot, but this time is different. Things are a little tougher than usual, and you’re having to manage your resources carefully. Still, you don’t feel too tense, as this is nothing you haven’t seen before. You’ve just about cleared the enemies nearby when suddenly a powerful new foe appears, one you’ve never seen in this particular mission. Your life is low and defeat seems all but certain, but in the end you prevail. You’ve defeated your enemy and gained some extra loot, and maybe a story to share with your friends.
In order to provide a dynamic gameplay experience like that, Magic: Legends makes use of a system we internally call the “Director”. This system controls which enemies spawn, where they spawn, and when they spawn. Rather than being purely random, it monitors your progress and tries to create challenges that both enrich and enliven your adventures through the Multiverse. You can think of it a bit like a film director, or the dungeon master leading a tabletop game.
The goal of this system is to vary up your play experience make it more fun to play through. More specifically, it is designed to create challenges that get changed up from play-session to play-session, while maintaining a good overall sense of gameplay pacing.
Like any good story, we want our game to maintain a strong sense of dramatic pacing. The ideal is to have moments tension and moments of release, alternating back and forth to create a compelling experience. The concept of pacing is used in every entertainment medium: from cinema to music, and of course, games. Typically, we create pacing in games by carefully distributing enemies and environmental obstacles, but this has a downside. As you master the game you will learn these placements and no longer be surprised.
We could randomly place enemies, but then we have random pacing as well. The Director solves this with two components. The first is the “sensing” component, which monitors your progress and tries to estimate how “intense” your experience is at any given moment. We track an “intensity” score for each player that goes up when that player’s character or their summons take damage, or when they defeat enemies. Ideally, we want this intensity score to rise over time, and then fall back down, creating a roller-coaster shape that exemplifies good pacing.
The second component, the “acting” component, tries to make the intensity value go up and down. As you play, the director transitions between a “Build-up” state and a “Relax” state. While in Build-up, the director will periodically spawn new enemies, and the longer you stay in Build-up the more ferocious those enemies will be. This gives you a greater challenge, but also a greater potential for reward.
If your measured intensity goes above a certain threshold, the Director transitions into Relax. You will still need to deal with any enemies remaining at this point, but Relax gives you time to catch your breath and release some of that tension by spawning fewer and less challenging enemies.
Enemy Varieties and Spawning
The Director spawns 2 kinds of enemies, “wanderers”, which wait for the player to engage, and “hunters”, which seek out the player and attack. Hunters tend to be the more challenging enemies, and may strike at any time when you aren’t at a safe area like a town or respawn point. Because of this, the Director never spawns hunters when in its Relax state.
Additionally, enemies may occasionally spawn as Legendary creatures, which have power modifications added onto the normal version of the enemy. Many of these modifications take the form of well-known abilities from Magic: the Gathering, like Deathtouch and others:
You may be familiar with AI directors from other popular games, but what makes the Director for Magic: Legends so unique is that it gets to spawn a huge variety of different creatures from the world of Magic: The Gathering. For each mission, the designers set a “mode” on the Director which contains a list of enemies that are allowed to spawn. If you’ve played the card game, then you can think of this as being a bit like your opponent’s deck. It makes sure that you fight enemies that are thematically appropriate but has enough to create variety from session to session.
While it might not be obvious, choosing where things will spawn presents a challenging problem. Magic: Legends has a diverse range of environments, from tightly packed, linear levels to spacious areas with many paths. The Director can change your experience by spawning enemies, but it needs to make sure that you will encounter those enemies in order for them to affect you. If they were spawned on the other side of the world, you don’t really care that they exist.
The Director relies on multiple techniques to know where to spawn enemies. It understands where the playable area is, and places enemies where they might logically emerge. For example, the Director might notice that a tent is nearby, so it will select an enemy to spawn and place it inside. The enemy then plays an appropriate animation which shows them coming out of the tent. A diverse range of enemies, environments, and animations leads to fun combinations of visible spawn-ins.
When an animation or context-specific location is not available, the Director will try to spawn things outside players’ views such that it appears they were always on the map, waiting for the player or hunting the player down from afar.
Behind the Curtain
Ideally the Director will keep your time in game exciting and fun while running invisibly in the background. The goal is to create the subconscious sense of pacing gotten from watching an epic film while keeping you engaged. We hope you enjoyed this peek behind the curtain and into the systems that drive Magic: Legends.
We can’t wait to see you in the Multiverse!
- Daniel Hogberg, Senior Software Engineer, and Macoy Madson, Software Engineer
There’s always something new to talk about, so make sure to follow us on Twitter and Facebook for the latest Magic: Legends news. Also make sure to join our official Discord server to chat with the devs and other fans like you!