A maze and dungeon generator
A playground for maze and procedural dungeon generation.
Maze Mode
| Hex Mazes | Rectangular Mazes |
|---|---|
![]() |
![]() |
Dungeon Mode

Features
- Maze Generation: 8 different perfect maze algorithms (recursive backtracker, growing tree, Kruskal, Eller, Wilson, hunt-and-kill, sidewinder, binary tree)
- Dungeon Generation: 3 procedural dungeon types (caverns, rooms, winding)
- Pathfinding: BFS, DFS, A*, and dead-end filling solvers
- GUI: Interactive visualization with pan/zoom, pathfinding overlay, and mode switching
- CLI: Command-line generation with ASCII and image output
- Animation: Progressive rendering support for both mazes and dungeons
Example Usage
GUI
Example GUI usage (default style, seed, and size):
The GUI supports:
- Mode switching between maze and dungeon generation
- Interactive controls for algorithm/type selection, seed, dimensions
- Click-to-select start/end points for pathfinding
- Pan/zoom with middle mouse and scroll wheel
- Live pathfinding visualization
CLI - Mazes
Example CLI usage (default style, seed, and size):
Example output:
╷╶───┬╴┌─┬╴┌─┐┌┐
└───┐├┐│╷└─┴╴└┘│
╶─┬┐│╵└┤├┐┌───┐│
┌─┘╵└─┐└┘│└┐┌┐└┤
└─┐┌──┘╶┬┘┌┤╵└─┘
┌┐│└───┐│┌┘│┌──┐
│└┘┌┐┌┐││└┐╵│┌┐│
├──┘└┘└┘└┐└─┘│││
└┐╷┌─┬┐┌┐└┐┌─┘└┤
╷│└┘┌┘└┘│┌┘│┌┐╶┘
│└─┐└─┐╶┘│┌┘││┌┐
├┬┐└─┐│┌─┘└─┘├┘│
│││┌┐│││┌┐╷┌┐│┌┘
││╵│└┘└┴┘└┤││╵└┐
│└┐└┐┌───┐╵│└──┤
└╴└─┴┘╶──┴─┘╶──┘
Alternatively, you can generate a PPM image using:
CLI - Dungeons
Generate dungeons using the gen-dungeon subcommand:
# Generate a rooms-style dungeon
# Generate organic caverns
# Generate winding corridors with rooms
Example dungeon output (rooms type):
##########
#..........####
#..............#
#..............#
#..............#
#..............#
#..............#
#..............#
#.............E#
#..........####
##########
Legend:
#= Wall.= FloorE= Exit= Empty space

