Home > Design > Hate Random, Love Procedural

Hate Random, Love Procedural

November 14th, 2012

As roguelikes and games with roguelike mechanics get more mainstream success I’m seeing a bit of backlash against what is termed “too much randomness”.  I’ve seen a lot of this directed against FTL, but also against The Binding of Isaac and complaints of it in the latest X-COM.  Yahtzee wrote a good article on the topic earlier this year, and Craig Stern recently wrote in great length about the failings of random mechanics.  But I think it’s vital that we distinguish between randomised content and procedural content, as although there is some overlap the end implementation can have very different effects on play.  And for developers it’s important to understand the role of procedural generation, and why it’s not the same as “just random”.

I’ve always hated random mechanics in games.  Missing a weak enemy twice in a row because you got a bad dice roll can really ruin the feeling of a game.  Plus some developers seem to think having the ability to run thousands of dice rolls means they should have insanely complex systems that require intense study on a turn-by-turn basis to assess the probabilities.  If you need Wolfram open to figure out how many attacks on average it takes to kill that monster then likely the battle system is badly designed…

Chaos Plane in ADOM

This is random…

Dice rolls were popularised with D&D, where rolling that d20 and praying for a 17 or higher was part of the tension and the fun.  But a good DM knows that letting the dice rule the game is not so fun overall.  When role-playing you don’t want to be thinking about numbers all the time, and random chance can get in the way of a well-designed campaign.  The essential element of unpredictability should come from the imagination of the players.  However this history of dice in Dungeons and Dragons has made its way into many RPGs, with a lot of fantasy roguelikes in particular using numbers and dice ranges lifted straight from the Player’s Handbook.  Whilst drawing inspiration from their favourite sources they also blindly copied over these poor features.

I don’t want to get too much into why I hate randomness, especially when the two articles linked above go into plenty of detail.  If you’ve played Risk you probably know all the reasons.  Go play Small World instead and you’ll see how much more fun a deterministic system can be.  Feeling in control means you don’t feel cheated by the system, and you properly respect the winner for their skill in attaining victory.  Importantly in single player games a deterministic system means you have only yourself to blame for failure, and you are forced to learn to be a better player instead of blaming the game.  Instead of thinking “I’ll get lucky next time” you think “I’ll make better choices next time”.

I do sometimes use randomness in games though.  It has its place in providing variety, and in also giving the player the option of taking a risk on something.  Usually in my games when an option is open with random chance it’s a high risk, high reward decision; it’s part of my philosophy that power always has strings attached.  But when present it’s usually entirely optional – the default action is the deterministic one – and the chance of failure is made clear.  Another good (or at least acceptable) application of randomness is in providing bonuses instead of failures.  The assassin’s 1 in 4 chance of paralysing an enemy in Dungeons of Dredmor for instance.  You know you can’t rely on it, and you always feel good when it kicks in, yet it doesn’t dominate the play.  But I’m very much against randomness overshadowing the outcome of player choices.

So why do some games make heavy use of randomised results?  To stop them being linear puzzles, predictable from the very get-go.  To prevent you feeling secure in what’s going to happen next.  But this is where procedural content generation comes to the fore.  And it’s important to both consider how it creates content for the player, and for how that content changes over time (AI).

It should be stated loud and clear that procedural does not equal random.  It tends to use a random seed, yes, but it builds upon that intelligently to produce *interesting* content instead of just random content.  A perlin noise map is very different from a procedurally structured forest map populated with enemies, items and quest goals.  Your level generator should be more than just a form of terrain mapping – it should be its own AI, a designer following a ruleset with some random initialisation to produce varied content.  The rules and design it follows should produce intelligent and interesting content for the player that goes far beyond simple random patterns.

Jeff Lait's Smart Kobold

…and this is procedural – Jeff Lait’s ‘Smart Kobold’ with intelligent content arrangement

However if one does procedural content badly then it can degenerate into pseudo-random levels.  Unfortunately a lot of games using procedural techniques use them weakly.  Dungeon generation is separate from monster placement, which is separate from item placement, and monster and items tend to be spread randomly across the level without consideration for the player experience.  This is really not taking full advantage of what a well-designed procedural generator can do.  Of course writing such a generator is far from trivial…

But even poorly implemented procedural content is better than pure random.  It sets limits to ensure the game is completable, that the challenges can be overcome or avoided.  Floodfilling to ensure dungeon connectivity for instance, or restrictions on monster spawning to prevent them appearing next to the player – simple touches that make a big difference, removing the chance of perceived unfairness from the game.  A procedural generator provides a more structured experience, with patterns that the player can come to recognise and take advantage of / game.  It ends up forming part of the game rules that the player is working with and against, an integral part of the play.  And of course there’s the element of surprise – the turning round the corner to find something you haven’t prepared for, and thus having to react to the circumstance in novel ways.  This is different from a string of random misses in a random battle system, as it doesn’t take away any sense of entitlement and still leaves you feeling in control of whatever situation arises.

Procedural over time is another area that’s under-developed.  AI is a big part of this – mobile units that react to the player’s actions and present their own challenges.  These can introduce the complexity of interactions that normally other players add to a game.  Good AI is also tricky, but even simple behavioural patterns can create the components for emergent complexity.  What there really isn’t enough of though is procedural changes in the level over time.  A dungeon that reshapes itself, that reacts to your presence or the movements of enemies, can create an engaging environment to explore and forces you to constantly reassess your tactical surroundings.  A few examples of this are the ice levels in HyperRogue, the sand dungeon in Tales of Maj’Eyal, and the rather crazy dynamic levels in my own UNSTOPPABLE.  There can be more detailed control of content over time, like the famed AI Director in Left4Dead, and I’m hoping we’ll see even more novel stuff in future.

PCG for me has always been about crafting a player experience that is fun, engaging, and of course different every game.  Randomness, on the other hand, I find is rarely fun or engaging, and often ends up feeling very samey over time. One game of snakes and ladders feels very much the same as any other, and if you keep staring at perlin noise maps they quickly lose their novelty.  A really detailed procedural system can not only generate compelling content, it can also react to a player’s actions, crafting a uniquely tailored experience which only that player will ever see.  Achieving that is far far better than a string of natural 20s.

  1. January 28th, 2013 at 05:35 | #1

    Really interesting post. For my two cents, I think one issue – as you note, by saying creating such a thing is far from trivial – is that random is simply *easier* than procedural. For instance, take a random engine and a procedural one which both took the same amount of effort to write. The “random” one would have far more options, but many would be uninteresting or unfair; enemies spawn next to you, some rooms can’t be accessed, you get a run of events that not even the greatest player could avoid dying to, etc. To me (and this is something I implement) the key is that a procedural generator actively *excludes* some options – you cannot have enemies spawning next to you, you cannot have certain options appear. It starts as a random generator, then removes all the crappy options, leaving only the high-quality possibilities behind. For instance, in generating religious symbols, I’ve had a kind of iterative process where each time I have the game generate a hundred or so, I look at them and I note the few that don’t look very good, or look too similar to others, and disable them, then try again. It requires a lot more effort, but it means the uninteresting or similar generations are then removed from the pool.

    Anyway, I love the idea of dynamic levels. I’ll have to think on that one myself…

  2. Nillo
    January 28th, 2013 at 05:19 | #2

    Well, I was pleasantly surprised to see my own character in this article. :)

    I don’t share your distaste for randomness, though, with the exception of games where the results of an entire strategy come down to a single die roll. Contrary to what some would expect, the more random rolls a designer includes in their game, the less random it actually becomes – because the results of the rolls will statistically spread out so that the player receives an amount of successes proportionate to the success chance. It’s only when a few die rolls are much more important than others that it becomes a problem – for example, in X-COM, one of your squad members may die if he just makes one unlucky die roll and is critically hit by an alien. In that case, I think the system is poorly designed and should be revisited so that those “important” rolls can be eliminated with careful play.

  3. Jo
    November 18th, 2012 at 16:06 | #3

    Semantics aside, there is good substance to this post Darren. Nice shout out to Small World. I think computer gaming, especially the indie and roguelike scenes, can learn a lot from table top games. Accessibility, limited scope, highly variable…

  4. November 14th, 2012 at 14:38 | #4

    Bleh, I don’t care about the dictionary definitions. The words as I’ve used are how they get used in real discussion in the context of game design and mechanics. “Intelligent random” is pretty much what people mean when they talk about PGC.

    As for Smart Kobold, I wasn’t referring to just its dungeon generator, but also how it lays out enemies, how those enemies lay themselves out after you breach the entrance, and how they lay traps, move items etc. Have you ever used the ring to explore the dungeon before you enter? It’s quite fascinating how it rearranges *after* the game starts.

  5. November 14th, 2012 at 12:28 | #5

    I do not like your choice of words.

    “Procedural” means “generated algorithmically rather than manually”. “Random” means mostly that you do not know beforehand how it will look.

    All your examples are both procedural and random. In fact, Smart Kobold is less procedural, because the dungeon is built from manually designed blocks. Non-random procedural could be a fractal which is exactly the same in every game, for example.

    I would prefer “intelligent random” or something like that.

Comments are closed.