Want to read ahead? Advanced chapters are available on Patreon: https://www.patreon.com/iLikeeMikee
Castlevania was a castle George built stone by stone. Every room designed by hand, every enemy placed with intent, every hallway joined to the next with the care of a watchmaker fitting gears. The player walked through a world that existed complete before they pressed Start, a world where every corner was planned and every surprise was, paradoxically, planned too.
Isaac couldn't work like that.
Isaac was a roguelike. A game where every run generated a fresh map with new rooms, enemies, items, and challenges. A player who died and started from scratch wouldn't see the same basement twice. Endless replayability was the game's reason for being, far more than a bonus feature. If Isaac generated the same map every time, it was just an action game with permadeath, a frustrating idea. If it built a different map each run, dying turned into an invitation to try again rather than a punishment, because the next run would be different, and different meant new possibilities, new combinations, new moments.
The trouble was that "random" and "good" weren't synonyms.
George knew that from experience. He had played roguelikes in his previous life, hundreds of hours in games like Spelunky, Enter the Gungeon, Dead Cells, and the original Binding of Isaac itself, and the line between an addictive roguelike and a frustrating one always ran through procedural generation. A good generator produced maps that felt handcrafted even though they were random: every room had a purpose, every branch balanced risk and reward, every run told a distinct yet coherent story. A bad generator churned out empty corridors, dead ends, unfair item spreads, and the sensation of a computer rolling dice instead of building a world.
George was going to build a good generator. To do that, he had to crack a problem that sounded simple and went deep: how do you get a computer to design levels that feel like a human designed them?
* * *
George started with the basics: the map's structure.
He opened Isaac's blue notebook to a fresh page and drew a grid. Nine squares by nine squares. Eighty-one cells. Each cell could sit empty or hold a room, and adjacent rooms, sharing an edge, connected through doors.
It was the simplest workable layout for an Isaac map: a 2D grid where rooms snapped in like dominoes following adjacency rules. Abstract, flat, making no attempt to simulate a real cave or basement, and that abstraction was deliberate. Isaac aimed to build a readable, navigable, variable play space rather than mimic realistic architecture.
George laid down the parameters for the first floor, the Basement, in the notebook:
Grid: 9x9 cells.
Minimum rooms per floor: 7.
Maximum rooms per floor: 12.
Mandatory rooms: 1 spawn room (where Isaac starts), 1 boss room (holding the floor's boss), 1 item room (holding a passive item), 1 shop (where you spend coins), 1 secret room (hidden room opened by bombing a wall).
Optional rooms: between 2 and 7 regular rooms with enemies.
Seven to twelve rooms scattered across an 81-cell grid. Most of the grid would remain empty, and occupied cells would form an irregular pattern like a constellation in a black sky, linked by doors the player walked through from room to room.
George coded the data structure that first morning. A 9-by-9 two-dimensional array where each cell stored a room ID or a null value. Every room held four door flags: north, south, east, west. If two neighboring rooms existed, both had the matching door switched on. Simple, tidy, and fast to query: to check whether a room sat north of the current position, you just checked the cell above it in the array.
Still, the data structure was only the skeleton. The soul lived in the algorithm that filled the grid.
* * *
George called his first algorithm "the drunkard" because it acted like a drunk wandering a city: taking a step in a random direction, then another, then another, leaving a trail of rooms behind it.
The process was straightforward:
1. Place the spawn room in the center of the grid (cell 4,4).
2. Pick a random direction: north, south, east, or west.
3. Move one cell in that direction. If the cell is empty, put a room there. If occupied, pick another direction.
4. Repeat from the new spot until the floor's room count is reached.
5. Place the boss room in the room farthest from spawn.
6. Place special rooms (item room, shop, secret room) in random spots meeting specific rules.
George coded the drunkard algorithm in one afternoon. He ran it a hundred times and inspected the console output: text grids where dots marked empty cells and letters marked rooms, S for spawn, B for boss, I for item, $ for shop.
The results were instructive. And awful.
The drunkard turned out technically playable maps, there was always a path from spawn to boss, yet they felt like what they were: aimless walks with no design. Rooms stretched into long, thin strings like an endless hotel hallway, because the drunkard tended to keep moving in the same direction for several steps before turning. It lacked branches, loops, the feel of exploring a layered space full of paths and choices.
George studied the hundred printed maps, he'd printed them on paper because squinting at text grids on a CRT was wrecking his eyes, and saw what was missing: structure. The drunkard generated paths. Isaac needed maps.
* * *
The second iteration was what George called "the tree."
Instead of a single line snaking across the grid, the tree grew branches. The algorithm started at spawn as before, yet at each step it could do one of two things: advance in a direction like the drunkard, or branch off, sprouting a new arm from the current room heading another way.
Branches created choices. Rather than walking a straight corridor, the player reached junctions where they could turn left or right, each path leading to different rooms with different enemies and items. Exploring stopped being marching forward and became decision-making: do I go left, where I see an item room, or right, toward the boss?
George coded the tree and ran a hundred iterations. The maps looked better. They had shape: branches creating options, short offshoots ending in rewards, alternate paths to the boss offering longer routes with more items. For the first time they looked like game maps instead of diagrams from a math class.
They brought a new problem, though: dead ends.
Tree branches stopped abruptly. The player stepped down a branch, cleared three or four rooms, and hit a wall. They had to turn around and trudge back to the junction. In a fast-paced action roguelike where every second mattered, backtracking killed momentum and wasted time.
George needed loops. Paths linking back into each other so the player always had an alternate way through instead of retracing steps.
* * *
The third iteration was the one that worked. George named it "the explorer," though in his mind it blended three ideas distilled from the roguelikes he remembered and his own experience as a level designer.
The explorer ran in three phases.
Phase 1: The main path. The algorithm built a path from spawn to boss using a modified random walk, one that favored turns, avoided straight lines and drunkard behavior, broke up long runs, and scaled in length to the floor's size. For the Basement, the main path ran 5 to 7 rooms.
Phase 2: The branches. Off the main path, the algorithm sprouted side branches 1 to 3 rooms long. Branches started from random rooms along the main path and pushed out at right angles. Each branch ended in a special room, item room or shop, or a normal enemy room. They were optional: the player could skip them and head straight for the boss, or explore them for items and coins.
Phase 3: The loops. After building the main path and branches, the algorithm scanned for chances to connect rooms sitting in neighboring cells with no door between them. If two existing rooms shared a grid edge, there was a 30% chance the algorithm opened a door between them, creating a loop, an alternate path linking two parts of the map. Loops eliminated dead ends and gave the floor the feel of an interconnected space.
George coded the explorer in three days. It was the hardest code he'd written for Isaac, harder than the rendering engine or the movement system, because procedural generation ran just once instead of repeating every frame, yet its output shaped the entire player experience for the next thirty or forty minutes.
If the generator produced a good map, the player had a good run. If it produced a bad one, no mechanics, items, or synergies could save it. The map was the foundation, and everything else sat on top of it.
* * *
Before testing the generator, George built a feature that would remain invisible to 99% of players and essential to the 1% who would obsess over Isaac: seeds.
A seed was a number, a 32-bit integer, meaning over four billion possible values, that fed the game's random number generator. Every random choice the generator made, which direction to turn, where to grow a branch, whether to open a loop, which enemies to place in a room, which items to spawn in an item room, depended on the sequence of numbers coming out of the generator, and that sequence was completely fixed by the seed.
So if two players entered the same seed, they got the exact same map. The same rooms in the same cells, with the same enemies, the same items, the same bosses. A reproducible run inside a random system.
That existed for sharing. George had seen it with the original Isaac in his previous life: players trading seeds on forums like secret codes. "Try seed 1234567: Brimstone in the first item room, Sacred Heart in the second, broken run in ten minutes." Seeds turned a solo experience into a communal one: hundreds of players could play the exact same run and compare results, debate strategies, race to see who cleared it faster or with a higher item percentage.
George built the seed system in one morning. At the start of every run, the game rolled a random seed off the system clock. The player could read the seed on the pause screen, an eight-digit number, and type it into the start menu to replay a specific run. A small feature. It was going to be huge.
* * *
The generator decided where rooms went. What sat inside each one?
George solved that with room templates: handcrafted rooms the generator picked from a catalog. Every template was a complete room with a fixed arrangement of obstacles, a list of enemy spawn points, and a difficulty rating from 1 to 5.
Templates were pure design, chosen by hand down to the last detail. George sketched each one in the blue notebook and built it into the engine: where every rock sat, every pile of trash, every floor pit, every raised ledge. Marcus and Priya drew the tiles for each obstacle, and George assembled templates like pieces of a modular puzzle.
The Basement held forty templates in the first build: ten easy ones, open rooms with few obstacles for early floor rooms; fifteen medium ones, with rocks and pits splitting the floor into zones and forcing the player to weave while dodging enemies; ten hard ones, tight mazes with little room to maneuver; and five special ones, rooms with unique layouts appearing only once per floor.
The trick was that players would never spot the templates for what they were. Every room felt unique because the enemies spawning inside shifted each run, items varied, and its spot on the map moved. The exact same template might show up as the second room of one run and the second-to-last room of another, feeling different both times because the context changed: the player carried different items, different health, different powers.
It was design hidden inside randomness, the paradox of a good roguelike: every individual piece was crafted with care, yet the way they combined stayed unpredictable.
* * *
On a Wednesday in May, at nine at night, George generated Isaac's first complete floor.
He didn't play it yet, since combat wasn't in, nor items, nor enemies with working AI. What he did was generate the map and walk through it as a placeholder Isaac: a red square moving through rooms full of gray rectangles, the obstacles, and yellow circles, spawn markers for enemies that didn't exist yet.
Rectangles and circles. Just as Castlevania had begun with a white rectangle.
This time, though, the map changed. George tapped a key that regenerated the floor. Rooms shuffled, obstacles shifted spots, yellow circles popped up in new places. He tapped again. Another map, another layout, another run.
Ten times, twenty, fifty. George generated fifty floors and walked every one of them with the red square, steering around gray rectangles and crossing doorways opening into rooms that hadn't existed a second before.
The maps had shape. The abstract shape of a game space rather than the organic sprawl of a real basement: paths branching out, loops tying separate arms together, short offshoots ending in item rooms, the boss room always waiting at the end of the longest trail. Every map was different, and every one felt coherent. Playable. Navigable.
Tomas appeared in the office doorway, having stayed late doing QA on the PS2 port, and caught George at his desk generating maps.
"What's that?"
"Isaac. The floor generator."
"The red squares are the character?"
"Placeholder. Art comes later."
Tomas pulled up the chair beside him while George generated ten more maps. Then he said something George didn't expect:
"Generate another one."
George waited.
"Another. I want to see what comes out."
George hit the key. Another map. Tomas studied it, tracing rooms with his eyes as if plotting a route in his head.
"Another."
George generated another. And another. And another. Tomas was hooked. Hooked by pure possibility. No graphics, only rectangles and circles; no action, only a square drifting through empty rooms. He was hooked because every time George hit the key something new appeared, something that hadn't existed before and nobody had seen or would ever see again unless they typed the same seed.
"George," Tomas said, eyes still locked on the monitor. "If the final game feels like this plus enemies and items and stuff to blow up, people aren't going to be able to put it down."
On screen, the gray rectangles and yellow circles sat in a nine-by-nine grid. The rawest, ugliest, most abstract form of what Isaac would become. And Tomas, a QA tester whose job was breaking games, couldn't stop asking for another map.
The generator worked.
* * *
That night, after Tomas went home, George ran a calculation in the blue notebook.
With the current parameters, a 9x9 grid, 7 to 12 rooms per floor, 40 templates, 5 floors, and a 32-bit seed, the number of possible maps was staggering. George didn't try to calculate it exactly, since the combinatorics were impossible on paper, yet a conservative estimate put it past a billion unique configurations for the Basement alone. Multiplied across five floors, the count of wholly distinct runs became incalculable.
A billion basements. Each one different. Each generated in a fraction of a second by an algorithm George had written in three days.
It was dizzying. And that was only the layout. Still to come were the enemies filling the rooms, the items defining each run, the bosses waiting at the end of each floor. Every layer George added would multiply the possibilities exponentially, until the number of unique experiences Isaac could produce became, for all practical purposes, infinite.
An infinite game built by a finite team inside a two-hundred-square-meter office.
George closed the notebook. He glanced at Marcus's mural on the back wall, barely visible in the dim evening office. Dracula's castle with its roots and towers. Isaac's basement to its left. The blank space to its right.
Castlevania was a castle with a fixed number of rooms George had laid one by one like a mason setting bricks. Isaac was a labyrinth that built itself, different every time, endless in its variations, raised by an algorithm George had taught to think like a level designer.
They were different things, feeding different parts of the brain. Castlevania offered the pleasure of exploring a crafted world where every detail sat in its place. Isaac offered the thrill of facing a world you didn't know and couldn't memorize, where the only constants were your skill and your luck.
Two ways to play, two pleasures, two ways to design; and George was chasing both at once, in the same office, with the same team.
The labyrinth that built itself was ready. Now it was time to fill it with monsters.
Enjoying the story? Read further ahead on Patreon: https://www.patreon.com/iLikeeMikee
