Procedural one-page dungeon generator

Originally published at:


Really cool. I remember getting out the graph paper and making them one page / block at a time. Makes me long for the old days when my buddies and I would play. Anyone have ideas the best way to have a D&D like experience on-line these days?


Very nice! I’ll be losing some hours playing with this!


If you’re like me and my friends it wouldn’t take long for someone to get bored, announce they are wielding their “Sword of Infinity Damage” and swiftly dispatch all the other characters before leaving to go jump BMX bikes in the nearby empty field.

D&D is not for the faint of heart.


Anyone any idea how this actually works?

Anyone have ideas the best way to have a D&D like experience on-line these days?

We’re in our 2nd year of playing 1st Edition on Tabletop Simulator via Steam. We voice connect thru Google hangouts. As support for hangouts is getting sketchy we’re considering changing to discord for the VoIP. We have usually 5-6 players (up to 2 characters each) + DM. Our DM has gotten pretty good at creating maps. We’re old school, 40 yr’s average experience, most started at the inception. I’m a late bloomer with only 20 years in. One of our guy’s logs in from Japan (Late for him) we play Sunday mornings from 8-1pm. We start late September to late March.
This setup is about the least expensive option to get started with. Not sure how it will evolve. There are other options. (Roll20, Medieval Engineers) but this is working for us as of now.


Tabletop Sim always seemed a little heavyweight for me for RPGs. How did you get maps into it?

When I played RPGs online I used Roll20 most recently. Back in the day I used some weird early-Python thing whose name escapes, or just IRC.


A friend and I experimented with procedural dungeons on a computer back in the day, using the 1st edition DMG’s random dungeon generator (intended dice rolls). Our only computer access was our college’s UNIVAC which our current FORTRAN 77 class was time-sharing. We used punch cards–PUNCH CARDS!–and our output was textual descriptions printed on that extra-wide fan-fold paper.

Our idea was to have the DM take the the computer-generated descriptions and walk through it ahead of time, manually converting text to graphical map representation and noting what monsters were present in each room. It took hours and hours to create the program and eliminate all the typos. The resulting mountain of punch cards wouldn’t even fit in one wide shoe box. It was the many times larger than the biggest stack of cards we’d ever seen submitted to the computer operator. Typos meant we had to resubmit this program many times before we got a successful execution and each time we submitted our stack of cards, the computer operator would give us the stink eye.

Once we got our several pounds of printout from the first successful run, we began graphing. We knew we were screwed by the third hallway we graphed, when we found ourselves looping back and intersecting a previously mapped hallway that was not in the earlier description. We had pages and pages of random description with no spatial record to prevent these sorts of collisions. We were programming noobs and not sure how to address such a problem, and seeing how the execution and print ate a conspicuous amount of the class’s computer budget, we shelved the project, literally, storing the punch cards in my friend’s closet, unable to put it all in the trashcan. So many tedious hours but we couldn’t just throw it out.


Our only computer access was our college’s UNIVAC which our current FORTRAN 77 class was time-sharing.

Oh my, yes, flash-back to hours spent coding DM assistance programs, character generators, name generators on clunky 1980’s PC’s :smiley:

The graphics on this generator are nicely done, but my criticism is that (as with many procedural generation ideas) I can see no clear underlying “use case” for the imagined construction. Why was this item built? How was it used? How do those ideas shape its structure?


I was looking for some hints as to what sort of algorithm creates the dungeons, and this is all he said about it (that I could find), which, looking at the outputs, makes things pretty clear:

I grow a dungeon as a tree starting from the entrance making sure that almost all “branches” are symmetrical. The point is to create a layout with a lot of locally symmetrical parts, which supposedly should convey “hand-craftedness”. Then I add some loops, because tree-like structures are boring (at least that’s how it works in video games, I’m not sure it’s relevant for tabletop games).

Obviously there’s a certain amount of random variation that breaks up the “symmetry” - so each time it symmetrically places two elements, they’re not necessarily the same (which then creates asymmetries as it branches off of those elements). So it places a symmetrical room (or hallway of random length) in the allotted space, with symmetrically placed “door elements” and/or, in the case of hallways, junctions. But the set of “door elements,” for example, includes regular doors, open doorways, secret doors and “not doors,” which terminates that side of the branch. It then repeats. Which means it could theoretically be perfectly symmetrical as a whole and in parts, but the odds are against it.


Thanks for finding this. I’d be very much interested in looking at code that produces something like this. I should try to find some examples :smiley:

There’s a lot of discussion of map generation in forums dedicated to NetHack, but I’m not seeking those out again. Also, pretty pictures, but NetHack was doing this fifty-odd years ago with 4k of RAM. Please.

The construction goblin tucked his rollup behind his ear, then flipped through the grimy sheets on his clipboard. “Ah, here we go,” he said, pointing at a box on a page, “it says here that it’s because he’s a, wozname, mad wizard. We get that a lot in this business.”


Make that thirty-odd years, since NetHack didn’t exist until 1987. :wink: It certainly wouldn’t work in 4K of RAM, either; the DOS port needed a memory extender since it wouldn’t even fit in 640K.


This is fairly similar in output, though a different algorithm (it’s not doing symmetrical branching) and more flexible and complex (it actually produces playable D&D dungeons):

With an explanation and link to the basic generation code (in surprisingly readable perl) here:


H’yup, time to install this again. (Or perhaps recompile for RPi?)

Ah, cool. Thanks for pointing this out. Time to (learn to) read some perl code :smiley:

Some form of VoIP software is the first part of this puzzle. The groups I play with right now have settled on Discord as its free and easy to use, but its far from the only voice chat option. If all you’re interested in is theater-of-the-mind style play that can actually be enough to do the job. But if you want to replicate having a map and miniatures and include a way to have dice rolls and character sheets visible online, then is pretty much the standard. They have tools built right in for nearly any edition and system you might want to play.

This topic was automatically closed after 5 days. New replies are no longer allowed.