The Shuffle Bag (Procedural Gen Lessons #2)

The Shuffle Bag (Procedural Gen Lessons #2)

This is the second post in my series on the "95% problem" in procedural design.

Ever played a game where you got the same useless item three times in a row? It feels unfair, and worse, it makes the game's world feel small and repetitive.

True randomness can feel "clumpy." In a random system, you can get the same outcome multiple times. For a player in their first 15 minutes, this can be a disaster. They don't think, "oh, that's statistics," they think: "this game only has three items!"

One tricks we used a lot in Curious Expedition is something called a "Shuffle Bag". Instead of rolling a die for every item, think of it like a deck of cards:

  • 1: Put all your possible items into a list (e.g., a shotgun, a knife, and a shovel). 2: Shuffle that list.
  • 3: Deal them out one by one, without putting them back in the deck.
  • 4: Only once the deck is empty do you reshuffle.

It guarantees a nice variety of content over a short period. You can do this within one level or even across multiple levels and store the shuffle state in your save game. It’s a simple trick that makes a huge difference.