I'm releasing both Blight's Decay™ and Snare's Solution™ at the same time because they were developed together, and they inspired each other. Today I want to talk about the design and development of Blight's Decay. The idea for Blight's Decay, seen to the left, came to me when I was exploring exponentials. I wanted to design a game around the point just before an exponential takes off, and becomes unstoppable.

For Blight, I wanted to play on the Toxic Mold that infects all the Cultists. I thought that this magical mold might grow exponentially, but being wiped out by mold isn't very fun. No, I wanted to balance it at the spot right before the mold swallows everything up. That point where you still have a chance to affect things.

I also wanted to see how big a grid of cards I could make on a small device like a phone. Of course I couldn't shrink the cards, so the 2 x 8 grid of Blight's Decay is pretty much the limit of grid games, without losing the fidelity of the cards themselves. Four Cultists, including Blight himeself, and four Victims are randomly placed on the grid. This allows me to play with the concept of adjacency, since it is adjacency that lets the Cultists slime the Victims. For this game I decided the animations were clearer if only right-adjacency (that is, adjacency by right angles only, no diagonals) were allowed. This also limited the number of directions the Cultists could attack, which would beome very important for the AI. Unlike Rootwork and Ruin's Run, which are Solo card games, Blight's Decay is actually a two-player game, but one side is always played by the device.

The AI was one of the most interesting parts of this game from a coding perspective. Take an average turn, where each of four Cultists may take an action. Since the order of actions can be important, we need to find the unique permutations of all possible actions by all possible Cultists in all possible orders. This is a factorial expansion, and factorials get big real fast.

Each turn each Cultist may:

- Advance a Slime card to an adjacent Victim, if they have any.
- Advance themselves to an adjacent Victim, if thy have no more slime.
- Advance a Slime card to an adjacent Cultist.
- Advance themselves to an adjacent empty space.
- Bubble the top two slime cards together to form one stronger card, if they have at least two Slime cards.. There is a 50% chance of gaining an extra Slime pip.
- Buble the top slime card into themselves, if they have at least one Slime card. There is a 50% chance of gaining an extra Slime pip.

When a Victim is converted by Slime they become a Converted Victim. They are now worth negative points, and, more importantly, Blight can ignore them when determining adjacency.

Each Cultist has a wide range of options, but how to choose the best combination? I essentially needed the AI to attempt all possible boards, score each board, and then execute the highest scoring board. Since I try every permutation, I can get behavior like a big card that gets handed from Cultist to Cultist, only to have it advance on top of a Victim on the other side of the board. In order to be able to execute an O(n!) algorithm on a phone, I wrote the whole thing in really fast C, and pre-optimzed as much as I could. For example, a Cultist can move a Slime card to another Cultist, but why do that if the new card wouldn't be bigger than the one the Cultist already has? By doing optimizations like this I can get the average trial size down to around 1,200 or so. Blight can analyze 1,200 boards in about 150ms on an iPad 3.

I've been talking for a while, but it's time for another screen shot. This is what Blight's Decay used to look like before I had this crazy idea to use mold as a texture. I was experimenting with different weathering techniques on the Cultist cards, as if you dug up a mold-covered tin of cards at an old abandoned church in the Woods. The Converted victims just got a green hue via shader.

So I went through some of my photos and I found this one named "Megalith." This image is from somewhere in the Appalacian Mountains of Virginia. There are just so many different mold and moss textures here, it's quite amazing. See if you can find them on the cards in Blight's Decay!

More pictures! Here's a picture of one of my favorite cards, the Corrupted Teen, the Selfish card.

Each turn the player gets three Honor cards that they must draw one at a time. If you are quick, you can just catch what the next card will be (the deck is face-up on the tray). Still you must play them one at a time. You may do the following with your cards:

- For each Honor pip on the card, dissolve one Slime pip on an exposed Slime card, Cultist, or Converted Victim.
- For each Honor pip on the card, reinforce a Victim by one Honor pip. There is a 50% chance that you will get an extra Honor pip when doing this.

If Blight runs out of moves the game is over. If your score is positive, you win. If your score is zero or less, you lose. Since Converted Victims are worth negative points, one way to increase your score is to remove them from the board.

Blight's Decay is a fairly easy game to win. Getting a high score, however, is much more difficult. The primary turn of the game is the first, where you must defend four victims against Blight and his Cultists with just three cards. This is right on the edge of doable. The average attack on the first turn is 6 pips across 4 cards. The average 3 honor cards are worth 4.5 pips. Generally, you cannot pass the first turn without losing one card. Which card, then, becomes the important question. It starts you off-balance and on the defensive. In fact whole games can finish before you get on the offensive. Once you do get to offense, how do you do it? Do you reinforce your Victims, hoping for extra pips? Do you burn down a Slime Deck so you can attack the Cultist directly and remove him? If you have to lose someone, who do you lose?

Don't worry. You'll always know who you save and who you let get Converted to the Cult. I'll keep track of that statistic for you. You're welcome.

Rob

## Comments