한국어
Home › Game Dev › Random Dungeon Generator

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.

Green is the start and orange is the exit. In text export, # is a wall, . is floor, < is the start and > is the exit.

Generator settings

The same seed and settings always give the same map.

How to use

1Pick a layoutChoose a dungeon of rooms linked by corridors, or a natural cave.
2Set size and seedChoose the map size and seed. Press Random to generate a new seed right away.
3ExportDownload the map you like as PNG, JSON or text and load it in your game.

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.