Random dungeon map generator on a grid
Your data
The seed is the map. The same number always draws the same dungeon, so a map you liked is never lost to one more click, and you can hand it to someone else by sending them a number rather than a picture.
Every room is reachable from every other one. The corridors are not scattered at random: they follow a minimum spanning tree over the room centres, which is what makes an isolated room impossible to draw rather than merely unlikely.
Your dungeon
| Rooms you asked for | — |
| Rooms that fit | — |
| Share of the grid that is floor, in percent | — |
| Can you walk from any room to any other | — |
The last line is checked on the drawing itself, not promised by the method. Every time a map is drawn the page floods the corridors from the first room and counts how many rooms it can touch. If that number ever stops matching, the line above says so instead of hiding it.
Asking for more rooms than the grid can hold does not fail loudly. The generator simply stops finding places to put them, so the count of rooms that fit is reported next to the count you asked for. A wider grid, or fewer rooms, is what fixes it.
Can a room come out isolated, with no way in?
No, and not because it is unlikely: because of how the corridors are chosen. They follow a minimum spanning tree over the room centres, which for n rooms gives exactly n-1 corridors and guarantees a path between any two of them.
The page does not take that on trust either. Every time a map is drawn it floods the corridors from the first room and counts the rooms it can reach, and it prints the result. Tested over 400 different seeds with no isolated room.
What is the seed for?
The seed is the map. The same number always draws the same dungeon, so you can come back to a map you liked, and you can share it by sending a number instead of an image.
Without it, clicking once more would destroy the map you had, and there would be no way back. Change the number and you get a different dungeon; keep it and you get the same one on any device.
Why did I get fewer rooms than I asked for?
Because they stopped fitting. Rooms are placed so they never touch each other or the edge, and on a small grid the free space runs out well before the count you asked for.
The page says how many you asked for and how many fit, side by side, rather than cramming rooms together to reach your number. A wider grid, or fewer rooms, is the fix.
| Grid | Rooms asked for | Rooms that fit |
|---|---|---|
| 20 x 15 | 30 | 3 |
| 24 x 18 | 25 | 6 |
| 48 x 32 | 30 | 24 |
| 90 x 70 | 30 | 30 |
Does the map print well?
It is drawn to be printed: the map keeps a white background and dark lines whatever colour scheme the rest of the site is using, because a dark map wastes ink and comes out unreadable on paper.
It is vector art rather than a picture, so it stays sharp at any paper size. The rooms are numbered so you can point at the table and say which one the party is standing in.
Reactions
0
0 Comments
Be the first to comment