Making randomness feel good is one of the trickiest things in games. If you go with true randomness — pure chaos with a side of regret — it often feels terrible to players. It’s clumpy, swingy, and frustrating. Drawing a 1-in-100 result three times in a row isn’t just unlikely — it’s inevitable given enough time, and that kind of streak tends to wreck pacing and fun.

credit: https://forums.lindale.io/t/grid-and-uniform/1154
What players tend to want isn’t “random” — it’s more about “unpredictability.” Something they can’t quite script, but can still react to and reason about. And that’s where my favorite randomization tool comes in: the humble deck of cards.
🎲 Why Not Just Roll Dice?
There are all kinds of clever techniques for smoothing out randomness: escalating chances, rerolls, weighted sampling, averaging multiple rolls — and they all work in different contexts. But none of them quite do what a deck of cards does: ensure coverage. You’ll see every card eventually, but in a shuffled order. Repeats are rare, patterns are broken, and you always get a fresh mix.
In board games this is standard, but digital games often forget how powerful it can be. In MoteMancer, we use this technique somewhere you might not expect: the music selection system.
♠️ Decks Within Decks
Each Element (Life, Earth, Water, etc.) has its own shuffled “deck” of music tracks. When a track plays, it gets set aside until it is ready to be shuffled, and we are guaranteed to not hear it again until we’ve cycled through the rest. Already, this means few repeats, smoother transitions, and way more variety.
But, we also have a deck of elements layered on top — like a meta-deck that controls which plane's deck we draw from. It includes cards like “Current Plane”, “Clockwise Plane”, and “Counterclockwise Plane.” Shuffle it, draw one, and use that to pick which elemental deck to pull a track from — using the player's current plane as the key. This technique is affectionately known as a "Deck of Decks".

The result? You always get music that’s relevant to your surroundings, but never in a fixed or looping order. As you move from Life to Water to Air, the soundscape shifts with you — organically and unpredictably, but always feels correct.
🌱 Predictable Chaos
There are so many more ways to play with this kind of layered randomness. Enemy spawns, game modifiers, even procedural terrain (looking forward to that one!). But for now, I just wanted to highlight a quiet corner of MoteMancer where a bit of clever math makes the world feel alive.
Thanks for reading, and if you’re curious: yes, I have spreadsheets for all of it. 😇
~CyanAvatar
