An inside look at how Magic: The Gathering Arena digitized the world’s most complex card game

The rule book checks in at 237 pages long and tournament prize pools climb as high as $750,000.

Magic: The Gathering Arena gameplay screenshot.
The stack of cards to the right of the screen represents a complicated array of game actions that the players can sort through using the interface. Wizards of the Coast

When the Magic: The Gathering collectable card game first debuted back in 1993, the decks included small paper rule books explaining how the game worked. Even back then, it was complicated. Many fledgeling players—like me—learned quirky versions of the game based on misinterpretations of that little book. The complexity wasn’t surprising since the game sprung from the mind of game designer Richard Garfield who was both a mathematician and Dungeons & Dragons enthusiast. The game’s enduring success, however, is a surprise—it spawned an entire genre of collectible card games across a variety of genres, and Magic has more than 35 million players across its various platforms.

In the 25 years or so since the game’s launch, that little paper rulebook has evolved and grown thicker. The total game has more than 20,000 unique cards, each with its own abilities and interactions. As a result, the rules now reside in a 237-page document on the website for the game’s parent company, Wizards of the Coast (owned by Hasbro). Essentially, players take turns managing resources, casting spells, and putting creatures onto a “battlefield” to fight. You win the game when you deplete the other player’s life points or they run out of cards in their deck. Each turn, however, is broken up into dozens of individual parts with nuanced guidelines about what actions can happen during each. It’s a lot to keep track of when playing with paper cards, but moving into the digital world can help.

A new online version of the game called Magic: The Gathering Arena launched in beta last year, the Wizards of the Coast development team needed to bring those rules into the program in a way that let seasoned players execute the complex interactions worthy of the games professional tournaments, while introducing new players at the same time. It wasn’t easy.

Entering the Arena

Magic: The Gathering Arena animation.
A screenshot from Magic: The Gathering Arena shows off the in-game animations that go beyond the typical card game. Wizards of the Coast

According to the principal software developer Andy Reiff, the process of bringing Magic’s rules into the polished interface of Arena started roughly four years ago. At that time, the only way to play on the web was Magic: The Gathering Online (or MTGO), which has been around since 2002.

While MTGO encompasses a much larger swath of the 20,000 total M:TG cards from history, the interface itself is extremely dated and prone to bugs. It’s dense and requires a somewhat nuanced understand of the game right from the start, but Arena is meant to draw in new players, which meant designing software that could streamline some of the many decisions players have to make during each turn.

“It’s not enough to enforce the rules,” says Refff. “We need to be able to communicate why things happen using visual cues, sound effects, and intention lines.” As a result, battling on Magic Arena feels much more like a video game than MTGO, which can sometimes feel like managing a surprisingly fun spreadsheet.

In Arena, when creatures enter combat, their avatars visually clash together with a battle sound effect. The game enforces the rules, but it also shows you why things happen as they do. “When we started on the project four years ago, we had very limited client visualization capabilities,” says Reiff. “If you wanted to know what happened, you had to read the card. The card was on the battlefield, then suddenly it was in the graveyard and you had to figure out why.” Arena set out to show players why those things happened with animations and guide lines. If a card in play prevents you from casting a spell or taking an action, it will flash red to show you why. In a real-world game, you might forget and breeze right by it without noticing. Worse, it could count as a rules violation in a competitive tournament and earn you a costly penalty. Arena simply won’t let it happen.

Making choices

With so much going on during every turn of the game, players have developed certain shortcuts that help physical games of Magic played with paper cards go more smoothly. Watching high-level pros play with actual cards can be difficult for new players because they rely so heavily on mutually understood shortcuts. The digital game doesn’t have that luxury.

“If you were tediously following the rules of Magic to the letter with no shorthand, priority passes back and forth between players many, many times,” says Reiff. “We knew we didn’t want the game to tediously ask you if you want to pass at every moment.”

The team avoided many of those extra clicks by developing a system that could first evaluate whether or not a player could actually do anything during a particular part of a game with the resources (referred to as “mana”) available. “When we stop and ask you a question, there’s something relevant for you to do,” says Refiff. “The software analyzes what the player can actually pay for. If they don’t have red mana, I don’t have to ask if they want to cast lighting bolt. If you’re wrong about that, you’re going to have a very frustrated player on your hands.”

Arena does still offer players full control, but even many higher-level players only turn that on when they know particularly complex interactions may come up. Those decisions can have serious consequences. Professional players use Arena for its large Mythic Championship tournaments, one of which is happening this week in Long Beach, California with a total prize pool of $750,000.

Applying the rules

Finale of Promise Magic: The Gathering.
Here’s an example of a card with a lot of complicated rules interactions. Reiff noted that it was particularly tricky because it makes copies of spells under certain situations. Wizards of the Coast

Because there are so many rules involved with the game, the program dynamically loads only what it needs for a specific match. “When the players load their decks, the rules engine will look at what cards are involved in the match,” says Refiff. “Each card has a certain number of abilities and each of those abilities involves rules. Those rules are loaded in on the final level of detail. If there’s no creatures with flying with anybody’s deck, the game doesn’t know flying exists.” Loading every rule for every match would choke the game’s performance.

Magic introduces new card sets several times per year, and they often bring new rules and interactions. The team typically starts working on bringing them into Arena soon after the card designs are locked, which is three to six months before launch. Beyond the new rules, the team can also anticipate when old rules will need more attention. Reiff offers an example in the form of a card called Gilded Goose. “It’s a very playable, tournament-level card that sacrifices other permanents,” he explains. “That was a little tedious before but when we realized people were going to play it a lot, we decided to spend some time smoothing out that process.”

That’s part of the game’s “auto tapping” feature, which tries to automate the way in which players spend their mana resources as they take actions during the game. The system analyzes what players can do—and tries its best to anticipate what they might do in the near future—with the different kinds of mana they have available. I’ve played a lot of Arena and, while auto tapping isn’t always perfect, it rarely makes an egregious error.

Saving us from ourselves

You can still screw up when playing Arena, but the team has worked hard to make it more difficult to do so. Click on one of your creatures at the wrong time during a turn, for instance, and you can end up activating an ability instead of attacking with it, which could mean the difference between winning and losing. In order to prevent this kind of accident, Reiff says the game analyzes your actions and makes sure you know what you’re doing when it seems out of the ordinary. Sometimes it makes sense to damage yourself or destroy your own in-game objects, but doing so by accident is—as Magic players say—a feel-bad moment.

Still, the game doesn’t fully equip players with training wheels. A card like Narset, Parter of Veils, for instance, prevents players from drawing extra cards while it’s on the battlefield. That doesn’t mean, however, that it will prevent players from casting spells to try and draw cards. They simply pay their mana and get punished for not paying attention. It’s the kind of wonderful, evil moment that makes Magic such a great game and it’s still in there.

The game isn’t getting any less complicated and, as new cards make their way into the game, things will only get more complex, but the team is committed to making it approachable for newbies while enabling high-grade tournament play. And if players make the transition to paper cards, the rules still directly translate so they can jump right in. They’ll just have to make the battle sounds themselves during the game.

Stan Horaczek
Stan Horaczek

is the senior gear editor at Popular Science and Popular Photography. His past bylines include Rolling Stone, Engadget, Men's Journal, GQ, and just about any other publication that has ever written about gadgets. For a short time, he even wrote the gadget page for Every Day With Rachel Ray magazine. He collects vintage cameras, eats pizza, and hopes you won't go looking at his Tweets even though the link is down there.