Contents

Procedural Generation and the Limits of Surprise

A generator can hand you a million rooms and still run out of things to say

Contents

Somewhere around the fortieth hour of a procedurally generated game, a specific thing happens. You walk into a room and you know what’s in it before your eyes have finished parsing it. You have never seen this room. The seed assembled it four seconds ago, out of numbers, for you alone. You have seen its parents, though, and that turns out to be enough.

That moment is the ceiling, and it arrives on a schedule. The industry has spent forty years treating generation as a content multiplier — a way to turn one designer-week into ten thousand rooms. It does that superbly, and it has done since the machines were too small to store the alternative. Keeping you surprised is a separate job, and the gap between those two claims has eaten more ambitious games than any other single design mistake I can name.

The universe that fit in 32K

Advertisement

Elite, 1984, David Braben and Ian Bell, BBC Micro, published by Acornsoft. Eight galaxies of 256 planets each — 2,048 worlds, every one with a name, a government type, an economy, a tech level and a one-line description, on a machine with 32 kilobytes of RAM. None of it was stored. A seed went into a generator and a planet came out, deterministically, the same every time you jumped there. Braben and Bell had aimed at an absurdly larger galaxy count and cut it to eight on the reasonable grounds that nobody was ever going to see the rest.

I got there through Firebird’s C64 conversion in 1985, on a tape that took long enough to load that you learned the theme. What I remember is not the 2,048 planets. It’s the trade table. A planet’s economy and tech level decided what it sold cheap and what it wanted badly: agricultural worlds handed you food and furs, industrial worlds wanted them and paid, and the profitable runs were the long jumps between extremes with a hold you couldn’t afford to lose. The generator produced inputs to a system, and the system had teeth — fuel, cargo space, pirates, a police record that followed you. The planets never needed to be interesting by themselves. They needed to differ in ways the trade model could read.

That’s the whole distinction, and it was solved in 1984.

Daggerfall’s corridor

The Elder Scrolls II: Daggerfall, 1996, Bethesda. The landmass is usually quoted at around 160,000 square kilometres, with thousands of towns and hundreds of dungeons underneath them. It is enormous and it is famously exhausting, because the dungeons are bolted together from prefabricated blocks and the blocks feed nothing. A corridor in a Daggerfall dungeon is a corridor. No trade model reads it. No faction cares that it exists. It is space, generated at volume, doing the work of space.

Elite’s generator fed a simulation. Daggerfall’s generator fed a renderer. Both shipped huge; only one of them still has anything to say to you in hour forty.

Surprise is a claim about the player

Advertisement

Surprise is a relationship rather than a property. To be surprised you need a model of what comes next and the game has to violate it, which means surprise runs on a hard budget: every violation teaches you the shape of the violation and the model updates. A generator sampling from a fixed distribution can emit outputs forever and still be out of surprise by Tuesday, because the thing you learn is never the outputs. It’s the distribution.

No Man’s Sky is the honest experiment. Hello Games shipped it in 2016 with eighteen quintillion planets off a 64-bit seed space, and the number was true. Players hit the ceiling within days. The planets genuinely didn’t repeat — the grammar repeated. Biome, palette, fauna variation, resource node, a sky. Once you’ve read the grammar, a fresh sentence in it is just a fresh sentence. Hello Games has spent the decade since bolting authored things on top: freighters, base building, expeditions with hand-written objectives and an end. The cure for too much generated content was content somebody wrote.

What Spelunky actually generates

Derek Yu’s Spelunky — freeware in 2008, the HD remake in 2012 — is the most-cited procedural design of its generation, and the citation usually praises the wrong half. The level generator is conservative to the point of dull: a four-by-four grid of rooms, a guaranteed path carved from entrance to exit so a level is never unwinnable, and rooms filled from a small library of hand-authored templates with a scatter of randomised tiles. You could enumerate the room types on a napkin.

The surprise lives in what the generator drops into a simulation. Spelunky’s objects have rules, the rules apply to everything in the room without exceptions, and the game has no interest in whose plan it wrecks. Arrow traps fire at whatever crosses the line — you, a bat, a snake, the shopkeeper sprinting after you with a shotgun because you took a jetpack you couldn’t afford. Rob a shop and the anger is permanent and it is global: the shopkeepers on the levels below know, and they’re waiting at the exit. Nobody wrote the sequence where a trap you triggered on purpose two rooms ago solves your shopkeeper problem for you. The generator wrote the room. The rules wrote the story, and only one of those two production lines scales.

This is what the roguelike loop is actually teaching, and it’s why the genre’s originals survive being ugly.

Generate the situation; author the physics

The pattern in every generator that holds up is the same. Roll dice into a model that already had teeth.

X-COM: UFO Defense (1994) generates a crash site and hands you a squad it also generated, with names you’ll replace and stats you’ll resent. The map is fresh every time and the rules never move: fog of war, time units, reaction fire, and the fact that the aliens shoot during your turn if you spend everything walking. That invariance is exactly why the tension holds after thirty years. Nothing about the generated map is doing the work.

Dwarf Fortress generates centuries of world history before you place a single dwarf — dynasties, wars, artefacts, grudges. The stories people write up at absurd length are always the simulation reacting to a generated fact, never the fact itself.

Left 4 Dead’s AI Director (2008) runs on hand-built campaigns. Its entire job is pacing: it reads a running estimate of how stressed the survivors are and decides when to open the taps. One generator, one job, still cited two decades later.

Frontier: Elite II went the other way in 1993 and modelled a hundred billion star systems at real scale, and the lesson is the same one Elite already knew — the universe that fit on a floppy was only ever worth flying through because there was an economy underneath it.

Generation was a compression format first

There’s a strand of this that the modern conversation has forgotten, and it ran straight through the machines I grew up on.

On a C64 or an Amiga, a generator was a way of not owning a disk. Elite’s 2,048 planets, the fractal terrain in Rescue on Fractalus, the endless scrolling in half the shoot-’em-ups on the covertape pile — all of it existed because storage cost money and arithmetic was free. Generation was compression, and everybody understood that’s what it was. Nobody wrote a press release about infinite worlds, because the infinity was a side effect of a memory map.

The demoscene took that idea and made a sport of it. The high-water mark is .kkrieger, released by the German group Farbrausch in 2004: a complete first-person shooter with textures, geometry, music and enemies, inside 96 kilobytes. Every asset in it is a procedure — the textures are generated at load, the meshes are generated at load, the soundtrack is a synthesiser that builds itself. It fits on a floppy with room to spare, and it looks like a game from the same year that shipped on a DVD.

And .kkrieger is a level long. That’s the joke, and it’s an honest one: the scene proved you could generate anything and then declined to pretend that generating it was the same as designing it. The demoscene’s long shadow falls across every one of these games, and the lesson it carried was about file size rather than about wonder.

The bit nobody wants to hear

Procedural generation is a budget decision wearing a design costume. In 1984 it was a storage decision: Elite’s universe existed because 32K could not hold 2,048 planets any other way, and the constraint produced a masterpiece. Now it’s a labour decision, and the labour it saves is the cheap kind. Rooms are cheap. Rules are expensive, because every rule has to be reasoned about against every other rule, and that cost is linear in nothing — it’s quadratic in ambition. A generator lets you skip the cheap work, and if you aren’t paying attention it hands you a game made entirely out of the work you skipped.

So: forty hours in, you walk into the room and you know what’s in it. That’s survivable, provided what’s in it still has to negotiate with everything else in your bag. Elite’s 2,048 planets stopped being interesting sometime during the first evening. The run to a rich industrial world with a hold full of contraband, a police record, and not quite enough fuel to reach anywhere safe never did. The seed was never the point. The seed was a way of not shipping a disk with 2,048 planets on it.

Advertisement
Advertisement
Jay
Written by Jay

vo.rs's games critic. Jay covers the medium as a system rather than a spectacle — this month's release, the indie nobody bought, and the Amiga game it's quietly descended from — asking what a mechanic makes you feel and why the loop holds. Learned to wait through a C64 tape load, never stopped playing since, and still finishes the odd 60-hour RPG out of spite. Expect argued verdicts, no score ever, spoilers below the line, and a running list of older games worth your weekend.