Codex Design: Combat and the Patrol Zone


This is the 3rd in a series of design articles about Codex. In case you missed the first two:

#1 Codex Design: Cards and Gold As Resources
#2 Codex Design: Heroes and Tech Buildings


Codex is asynchronous. That means someday you’ll be able to play the online version without your opponent having to be online at the same time as you. You can get through your entire turn without having to wait for your opponent, then they can take their turn without you having to be there either. In offline (tabletop) games, it also means turns go smoothly: without the fits and starts of the opponent constantly interrupting you.

If the opponent doesn’t make decisions on your turn, then doesn’t that make combat too simple? Or not interactive enough? The patrol zone is the answer to those problems.

You can have any of your units or heroes directly attack anything with hit points—any unit, hero, or building of the opponent’s. You don’t have to wait for the opponent to decide how to block your attacks though because they *already* decided their blocking plan before your turn started.

At the end of their main phase, they chose which of their units and heroes to patrol, and which slots they'll go in. If you have an attacker that CAN attack one of those patrollers, you don’t have to attack with it at all, but if you do then it MUST attack a patroller. Patrollers are the defender’s first line of defense so you’ll have to get through them before you can attack something else.

Each patroller has a different bonus. When you’re setting up your defense, carefully consider which bonus you want each of your defenders to get.

The most important slot is the squad leader. Your squad leader gets one point of armor, which means it will take one less damage than usual, but even more importantly it has “taunt.” That means the attacker must attack it even before your other patrollers.

The elite slot gives your patroller +1 ATK, so a 3/3 unit would become a 4/3 unit while patrolling in that slot, letting it deal extra damage if it gets attacked.

The scavenger and technician slots give you 1 gold and let you draw 1 card, respectively, when the patrollers in those slots die. These slots are great when you’re taking a beating. The extra resources of gold and cards can let you mount a comeback as you try to hold off an aggressive attacker.

The lookout slot gives your patroller resist 1. This means the opponent must pay 1 gold to target that patroller with any spell or ability. Sometimes the biggest threat to one of your units or heroes isn’t dying in combat, but rather dying to some sort of spell or ability. The lookout slot gives your opponent a disincentive to mess that patroller.

That’s pretty much it. Combat works in a very straightforward way where one thing directly attacks another thing and they each deal their damage to the other at the same time. Damage is persistent in Codex, meaning it doesn’t get healed automatically at the end of the turn.

Flying

Flying is also worth mentioning here, it's especially powerful. It works like it does in RTS video games, rather than how it works in most card games. In Starcraft, a Zealot (ground melee unit) can’t hit a Mutalisk (flying unit) ever. The same is true here. Flying units can attack ground units and not get hit back at all! Flying units can fly over ground patrollers and are not physically blocked by them at all! 

That’s a bit of a double edged sword though; flying units also can’t physically block ground attackers. So if you patrol one of your fliers, an enemy ground attacker can simply run under it and get to your vulnerable heroes and tech buildings. Overall though, flying units are very deadly, just as they tend to be in RTS video games.

Patrol Zone Design Features

The patrol zone is the most unexpectedly good feature in Codex. It was originally developed as a way to make asynchronous combat interesting enough, but players liked it so much that they said it should be a central feature no matter if the game supported asynchronous play or not. It turns out there’s a lot of nuance in just how you patrol your forces!

Before the patrol zone existed in Codex, some players originally suggested putting "taunt" on particular units (meaning the opponent would have to attack those first), but it's just so inadequate as a solution here. You'd be at the mercy of drawing the right units just to be able to block at all. The patrol zone lets you give that power to any of your forces AND lets you stack more bonuses on them too, which is just way more flexibility to plan your strategy.

The extra bonuses the patrol zone gives your defenders solve some very deep problems that we had for a long time. There's a delicate balance in Codex between rushing down and teching up. At some points in the game's history, rushdown was too good, which makes the game degenerate. At other times, it was too weak which means there's nothing to "keep you honest" if you want to blatantly start going for late game plans way too early. The simplest rules were the ones that lead to rushdown being too good, so is there some way we can do a small tweak to them?

It turns out, the single point of armor you get in the squad leader slot (and to a lesser degree, the +1 ATK you get from the elite slot) matters A LOT. That gives you just enough defense that early turns are not based on degenerate rushdown that you can't do anything about, but your buffer of protection doesn't last you long. Soon enough, units and heroes get big enough to overcome those bonuses and crush a weak defender if they don't start putting up a fight.

Unrelated to all that, the card draw system is also tuned on the edge of a knife. It has the great property that you get to draw a lot of cards, yet "card advantage" still matters. That means if you can use one card to destroy two of the opponent's cards, that actually does help you (which we want). It's also great that you often have a tough decision on whether to play a worker because that helps your economy later but might hurt your card draw in the process. It's all interconnected and just what it needs to be...but I wished you could get *slightly* more cards somehow without having to build the add-on that's specifically for that.

Just like it was very hard to tweak the combat system to give you "slightly more early defense," it was very hard to tweak the card draw system to give you "slightly more card draw." But in both cases, the patrol zone bonuses saved us. We were able to keep generally simple rules and use the bonuses to get the effects we wanted. If you are losing too many units on defense and you're trying to stay in the game, the ability to put a unit in the technician slot to draw an extra card really helps a lot. Same goes for the scavenger, it's the same concept really. If you're losing a lot of units, you might really need more gold or more cards (or both) to get back in the game. So we give you the option to do that, but it's not like we just give you an extra gold and extra card every turn. There's opportunity cost here and you have to work for it.

It turns out that somehow the extra defense, gold, and cards you can get from these bonuses were exactly what we needed. Usually this sort of design is driven from mechanics first. You'd think all this stuff exists precisely because we needed it, but the truth is that players liked the idea of the patrol zone so much that we kept developing it and kind of stumbled into it solving a few other design problems along the way. The original need for asynchronous play was a mechanical need leading to the patrol zone existing, yes, but that we actually kept it and enhanced it as a core part of the game was all from player feedback and what they enjoyed (and what I enjoyed too).

It's also pretty nice flavor that you set your units and heroes to patrol to protect you during the opponent's turn, then you spend that time figuring out your build order (picking cards from your codex to add to your deck). It feels like an RTS thing. ;)


If Codex sounds interesting to you, please support it on Kickstarter while it's there!

timely_messenger.jpg

Codex Design: Heroes and Tech Buildings

It’s generally good in a competitive game when there’s a lot of interaction. In other words, if your opponent is up to something, it’s good if you can do something about that.

In Codex, your vulnerabilities are on the table and you have to defend them. If you want to cast any spells, you need a hero in play to cast them—and your heroes can be attacked. If you want to make anything beyond the most basic units, you’ll need tech buildings to do that—and your tech buildings can be attacked as well.

In combat, you’re able to attack anything with hit points: any unit, hero, or building. Your ultimate goal is to deal 20 damage to the opponent’s main building—their base—but along the way you’ll probably need to try to take out at least some heroes or tech buildings. Think of this like a “pre-counterspell” in a way. If there’s a certain spell that you really don’t want the opponent to cast, you can kill the hero who casts it, and you’ll have at least one turn of breathing room until they’re able to resummon that hero. If there’s a particular unit you’re afraid of, destroying the tech building that produces it will also give you at least a turn of breathing room until they rebuild that building.

Heroes

Heroes are the stars of your army. You can access them without any randomness: they wait to be summoned in your command zone; you don’t have to draw them from your deck.

Heroes arrive at level 1, and you can spend gold to level them up, even multiple times in a turn. As they level up, they get better stats and new powers (and keep their old powers too). Heroes each have a “spec”. For example, Jaina’s spec is Fire. That means only Jaina can cast “Fire spells.” When heroes reach their max level AND if you didn’t just summon them, they can cast their ultimate spell. Beware of letting your opponent cast ultimate spells—they are really powerful!

Heroes are also great in combat. When a hero levels up from its lowest to middle rank, and when it levels from its middle to last rank, all damage on it is healed. So it can get in an early scuffle and still be fine later.

Killing enemy heroes is so important that you get a bounty for doing so. If you kill an enemy hero on your own turn, all your own heroes (that are in play) level up TWICE for free!

Heroes are fun and flavorful and give the game a ton of character. From a game mechanics perspective, they’re really important because they force you to have your vulnerabilities (in this case, your ability to cast certain spells) on the table where the opponent can interact with them.

Tech Buildings

You start the game with some weak units in your deck that you can summon from your base. If you want more powerful units though, you’ll need to build your tech I building. If you have a tech I building, you can then build your tech II building. That then lets you build your tech III building, which can then produce absurdly powerful, game-winning units.

You have access to three different specs during a game of Codex. For example, an all-red deck would have access to the Anarchy, Blood, and Fire specs. Your tech I building lets you build units from any of those specs. In other words, a tech I building lets you play any card with a bronze bottom on it, regardless of the spec.

At the tech II level, you have to specialize and choose a particular spec though. You’ll only be able to make tech II units of that spec and you’ll be locked into that same spec when you build your tech III building. In practice, this allows for tighter counter-play. If you have no idea what the opponent might even build, it’s hard to develop counter-measures. If you at least know the spec they chose this particular game, you have some basis to choose how to respond.

What if you want to to use two different specs in a game though? You actually CAN do that. Your base can hold exactly one add-on building. There are a few to choose from, and one of them—the Tech Lab—allows you to access two specs at once. That can be powerful, but the other add-ons are useful too!

There are lots of tricky build orders you can use, but the most standard approach is to lean on one particular hero (for spells) and one particular spec at the tech II level (for units). These do NOT have to match. For example, you might rely on the Blood hero and his Blood spells, but you are free to have your tech II building specialize in Fire if you want. That means you have 9 different routes (3 choices of heroes x 3 choices of tech specializations) in standard builds. That doesn’t even include the many more build orders you can explore with strategies that rely entirely on spells, or that combine two tech II specs using the Tech Lab.


Pacing

You have to pace yourself when you build your tech buildings. Each one takes one turn to finish constructing and you can’t even start building them until you have the requisite number of workers. That means if you build them “on schedule” as soon as you’re usually allowed to, you’ll get your tech I building in place on turn 3, your tech II on turn 5, and your tech III on turn 7. But things don’t always go as planned!

Pressure your opponent and make them spend so much on defense that they can’t afford to build tech buildings. Or destroy a tech building if you can and slow down their progression. You can’t just play solitaire here; Codex is highly interactive so your ability to expand your tech or to deny your opponent’s tech is tightly linked to how much you’re able to pressure each other in combat.

Heroes and tech buildings add a lot of flavorful fun to Codex because they match RTS games such as Warcraft 3, but they don’t exist in the game because of that flavor. Quite the opposite: I chose the RTS theme specifically because the game dynamics are so good when you have to protect your ability to cast spells (from heroes) and your ability to make certain kinds of units (from tech buildings). RTS video games are a great match and there’s a lot of parallels for Starcraft and Warcraft 3 fans to enjoy.

Here's the next Codex design article.

Codex Design: Cards and Gold As Resources

Codex is on Kickstarter now. I want to share with you a series of three articles about the design and workings of Codex, followed by a whole bunch of articles about the heroes and their specs. This is the first of three articles about the overall game system.

Introduction to Codex

Customizable card games usually involve decks that are designed to do one narrow thing really well. For example, imagine if we turned Starcraft into a card game and then made a deck that captured the idea of a Zergling rush. This deck would let you attack early with lots of weak, cheap units. In the real game of Starcraft, that’s a legitimate strategy, but not one you’d want to play over and over and over. If you did that, it would probably be boring and you’d want a new deck. And even apart from it being boring, if you only had access to such a single, narrow strategy in your “deck” then you’d have way too many unfair matchups against all the other narrow-strategy decks that happened to beat yours really hard or lose to yours really hard. It just wouldn’t be fun to play a single deck for very long and you’d often win or lose the game before even sitting down at the table.

The actual game of Starcraft isn’t like that at all. You don’t take just one narrow strategy into the game—you take a whole huge set of them. Rather than picking “Zergling Rush” before the game starts, you pick the entire race of Zerg. It’s interesting to play Zerg over and over and over because each time you can play a different subset of all the Zerg units, and that lets you create many different strategies. Having access to so many different units—more than you’d ever play in a single game—also gives you the resilience to stand up to a wide variety of strategies thrown at you. That helps keep matchups more fair.

Codex is based on this same idea. Your “codex” is a book that holds all the cards available to you during a game—more cards than you’ll actually use each time you play. In other words, the cards in your codex are analogous to all the units Zerg can make, but you only make a subset of those in any particular game. You build your deck as you play, adding cards from codex to your deck as the game unfolds. Your opponent doesn’t know which cards you added until later when you actually play those cards. This is a bit like the fog of war in RTS games, which is really cool!

Now that you have the high concept, let’s look at something really fundamental to real-time strategy games and customizable card games: the resource system. When you see how this works in Codex, you’ll see how it interacts with the high concept above.


Cards and gold are your main resources, so let’s look at how you manage each one.

Cards

You start the game with a deck of just 10 cards and you draw 5 of them for your initial hand. Each draw phase, you must discard your entire hand (yes, really) then draw that number of cards plus two, but stop drawing once you have 5. For example:

  • Discard a hand of 0 cards ➙ draw 2
  • Discard a hand of 1 card ➙ draw 3
  • Discard a hand of 2 cards ➙ draw 4
  • Discard a hand of 3, 4 or 5 cards ➙ draw 5

The point of this is that if you use a lot of cards in one turn, you won’t be able to draw as many cards next turn. It might take a couple turns to fully recover and get back to drawing 5 cards.

If you would draw a card when your deck is empty, then you shuffle your discard pile and it becomes your deck again, then continue drawing. In other words, your cards will eventually cycle back to your hand, even after you use them.

You won’t cycle just those same cards over and over though. At the end of each turn, you put two cards from your codex—any two that you want!—into your discard pile, face down. You’ll probably draw those cards in a couple turns, and your opponent won’t know what’s coming until you actually play them. All discard piles are face down specifically to hide your deckbuilding choices. Think of this like the fog of war in RTS games.

Gold

Gold is the other main resource that you manage in Codex. You need it to play cards, to activate abilities, to level up heroes, etc.

You get gold from your workers and you start the game with 4 workers (5 if you’re player 2). Starting with 4 gold gets the game going much more quickly than some other card games where you only have 1 mana to spend on turn 1 or whatever. You can also save gold across turns if you don’t spend it all.

Just like in RTS games, you have to actually invest in your economy to build it up. You can hire up to one additional worker each turn, and it costs 1 gold and 1 card. You put a card from your hand face down in your worker area to represent your new worker.

Putting It All Together

Hiring a worker costs 1 gold but then gives you 1 gold on every future turn of the game—that’s a great investment! It also removes a card from your deck, which is very important. It might sound bad to remove a card from your deck, but actually you want to remove whatever the weakest card in your deck is so that you’ll be more likely to draw your strongest cards. Remember, your cards will cycle from your discard pile back to your hand so you’ll get to play them several times.

This deck thinning mechanism interacts with your codex. Every turn you’re adding two cards to your deck, and some of those might be long-shot combos you’re trying to pull off. They might be answers to game situations that don’t end up happening. Or it might be that you were starting to go for one strategy but then you saw what the opponent was doing and wanted to shift strategies. In all those cases, you have cards that you might want to get rid of...and you CAN. The ability to get rid of some cards and turn them into workers gives you some leniency and flexibility that really helps.

Playing workers also interacts with your card draw though. Remember, if you play more cards in a turn, you’ll draw fewer at the end of the turn. For example, imagine you have 5 cards in hand, and you play two of them. Should you play a third as a worker? If you do, you’ll get to remove one of your worst cards from your deck cycling, and you’ll get 1 gold on each future turn of the game. BUT, you’ll go down to 2 cards in hand, and that means you’ll only draw 4 at the end of the turn (you draw the same number that you discard + 2, capped at 5).

You can’t always afford to hurt your card draw like that. The most important thing might be drawing a certain card you desperately need, in which case you should probably hold off on playing a worker. Or you might have to hold off because of the gold cost. What if you have 5 gold to spend, and you really need to play something that costs 5 or you’ll probably lose? In that case, you just can’t afford the investment of gold in a worker that turn.

Playing workers is generally a very interesting decision because it interacts so much with gold, card draw, and your deckbuilding choices.

Here's the next Codex design article.


Codex Early Access

Codex is the customizable card game I've been working on for a very, very long time. It will still be many months before we mass produce it and make it publicly available. In September though, we'll open up just 200 slots for people to get physical copies of the game. These players will be seeing the game way ahead of everyone else, and they can join us in polishing up the last bits.

All the artwork is finished and the game feels finished. So even though these are "prototype" copies, the cards would already be considered done by most companies. We'd like a larger group of people hammer away on it before the full release though.

If you want to get one of these 200 slots, these are the steps:

1) Sign up at as a patron at the $25 level for at least one month on my Patreon.
2) In September, you'll get instructions and access through Patreon to be able to buy the Codex starter set + all 6 factions for $99.99 + shipping. ($165 value, so this is a limited time thing.)
3) After we fill these slots, the game will be shipped to you shortly after, within a few weeks.

As long as you remain a patron (at any level), over the coming months you'll have access to change-packs of any updates we do to the cards (offered at just the cost of printing + shipping). You're also invited to give feedback on Patreon about balance issues. That said, it won't make sense to make balance claims right off the bat. You'll need to get your head around the game and play against competent players before you'd even know if some strategy was truly hard to beat. Lots of players are using skype to play each other remotely, so we can give you instructions how to participate in that, or even just watch other players' games to see what they do.

By the way, being a Patron is also a general way to support my work. All the money goes to paying for artists on Codex and also for artists and programmers on the Fantasy Strike fighting game. You'll get to see all the behind the scenes versions of everything I work on if you're at the $25 level and you'll get my Raw Game Design podcast at the $10 level and above.

If you have no idea what Codex even is, stay tuned. I'll post more about the game this week.

 

Codex-themed Pandante Deck

Codex is an upcoming customizable (not collectable) card game that does things very differently from the rest of the genre. It's themed after RTS video games such as Starcraft and Warcraft 3. You command heroes who each have their own spells and you build tech buildings that produce units. You carry a lot of versatility into each game because the cards in your codex are analogous to all the things a given race could build in an RTS. You choose which subset you want in your current game by building your deck as the game progresses. Players don't know exactly what other players are building toward, so there's a natural form of fog of war involved.

Here's the game's logo:

Although Codex has been in development on and off for over 10 years, it's not quite finished yet. You can get a sneak peak at some of the art though because there's a limited edition alternate art version of Pandante's deck on kickstarter right now. It lets you play Pandante with a Codex-themed deck!

Here's what normal Pandante cards look like:

And here's the Codex-themed version:

Also, here's the Joker from each deck:

This special deck is for two of the higher pledge tiers on the Pandante kickstarter (you get Pandante deluxe with or without professional-grade play poker chips, the new revised printing of Flash Duel, and this special Codex-themed Pandante deck). By pledging for this collector's item, you're also supporting the development of Codex and helping us reach stretch goals for Pandante and Flash Duel, too. Here's where you can pledge.

Stay tuned for another preview of this deck showing the Panda Champions / Codex Heroes.