Over the last few weeks there has been a lot of excitement around a new card game by Fantasy Flight Games and Richard Garfield the designer of Magic the Gathering. That game is Keyforge. But what makes Keyforge so amazing? Because every deck you buy is guaranteed to be unique. How can they guarantee uniqueness? Because Fantasy Flight Games uses a procedural generation algorithm to produce a selection of cards, dynamically choose the card back and even give it a procedural generated deck name.

They quoted the number of possible decks as 104 quadrillion. You shouldn’t be impressed when procedural generated combinations reach numbers like that. Because they’re counting things like two decks with the exact same cards and the exact same deck name and exact same image on the back. Though this one’s purple and this one’s green. Borderlands 2 did the same thing. Borderlands 2 holds the Guinness World Record for the most guns in a video game at 17.75 million. But you could find the exact same gun, but gun A does 18.6 damage per shot, and gun B does 18.7 damage per shot. My point being don’t get excited by the number of possible combinations. It’s fun to quote large numbers to impress people, but they’re deliberately inflating a metric that doesn’t mean anything on it’s own.

What matters is the number of unique card combinations, because that’s really what makes a deck “unique”. And if that number is significantly lower it still doesn’t matter. Let’s say there is a more reasonable number of combinations like 10 billion (much less than I imagine the real number is). That’s still more decks than the number of people living on earth, and the odds of getting and recognizing two different decks with the same card combination is still so low that it won’t matter.

So how do you make a unique game like Keyforge? While I’m sure they’re algorithm is tweaked and adjusted to produce more cohesive decks. The easiest way I would think is to generate a sequence that can be used to generate the deck. Ignoring special rules. A typical keyforge deck has 3 of 7 houses with 12 cards in each house. There are 35 possible combinations of houses. so let’s make it simple and say the first two digits of the sequence is 01-35. There are about 52 different cards in each house, so let’s represent the next digit in lower and uppercase letters where a = 1, b = 2, z = 26, A = 27, Z = 52, etc.

So now you can generate a random string, like 27-tnPUqcCtOkus-YVqQzUxFehVA-MrqyVIdKJHcF

Let’s say 27 is the combination Logos, Mars, Dis

And let’s say t is the 20th card in each house’s set, n is the 14th, P is the 42nd etc.

The first three cards of my deck are:

Not bad at all. The possible combinations of decks I can generate are 35*52^36 or

2,090,202,751,996,032,259,703,348,542,938,398,723,314,319,282,911,664,855,066,869,760 or Two Novemdecillion. That’s waaay more than keyforge. How embarrassing for them. I’m kidding of course, I didn’t do anything like weight synergies, restrict on rarity, or restrict at all for that matter. The point I was trying to make was that it doesn’t take a whole lot to generate uniqueness. With the number of combinations I could produce, I don’t even have to worry about duplication of decks. Because that would be a mathematical miracle. Heck the likely-hood of getting 7 of the same card is so low. I’d feel confident saying it’s not possible in press conference. Although that sort of the thing bit Sean Murphy in No Man’s Sky, when he said there’s a near zero possibility of finding another player, only to have two people find each other on the first day.

So what I have given you is a very basic method of generating something unique. How can you apply this to your game? Well say your game is a fantasy game. You want to generate a random hero, you could have 12 classes and 8 playable races. Already you’ve got 96 possible combinations. Say there are 20 unique traits, like tough skin, or fire resistance. Now you have 1,920 possible combinations. If everyone has 2 traits, 38,400 possible combinations. If everyone could be from one of ten regions. You now have 384,000. 2 genders, 768,000. 20 hairstyles, 1,536,000. 5 skin colors, 7,680,000. You can see some of these are more meaningful in gameplay, but it doesn’t take many more modifiers to declare uniqueness. If it’s a single player game you could probably get away with it as is.