Random Dungeon Generator
Generate random dungeons for roguelike games. Choose rooms and corridors or caves, set the size and seed, and recreate the same map any time. Export as PNG, JSON or text.
Generator settings
How to use
When it helps
Drawing every map by hand for a roguelike or dungeon crawler is hard. Procedural generation gives a different map each time, so every run feels new.
Rooms & corridors uses BSP, splitting the space in half again and again to place rooms, then links neighboring rooms with bent corridors so every room is reachable. Cave mode smooths random noise several times with cellular automata rules for a natural cave, and fills disconnected pockets so only one connected map remains.
The exit is placed on the cell farthest from the start, which naturally creates an exploration route. The JSON contains tile strings, room positions and start and exit coordinates, ready for your engine.
FAQ
I want to generate maps inside my game.
This tool is for previewing maps or making planning images. To generate in-game every time, implement the same ideas (BSP, cellular automata) in your engine code.
Are all rooms connected?
Yes. Rooms & corridors connects every neighboring room in split order, and cave mode keeps only the largest connected area, so every floor cell is reachable from the start.
What is a seed?
It is the starting point for the random numbers. The same seed and settings always produce the same map, so you can recreate a map you like or share it with teammates.
What does the JSON look like?
It has width, height, tiles (an array of strings, one per row), rooms (positions and sizes), and start and end coordinates. In tiles, # is a wall and . is floor.