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.