ZZZZZZZZZZZZZZZZZZZ OOOOOOOOO RRRRRRRRRRRRRRRRR BBBBBBBBBBBBBBBBB UUUUUUUU UUUUUUUU SSSSSSSSSSSSSSS Z:::::::::::::::::Z OO:::::::::OO R::::::::::::::::R B::::::::::::::::B U::::::U U::::::U SS:::::::::::::::S Z:::::::::::::::::Z OO:::::::::::::OO R::::::RRRRRR:::::R B::::::BBBBBB:::::B U::::::U U::::::US:::::SSSSSS::::::S Z:::ZZZZZZZZ:::::Z O:::::::OOO:::::::ORR:::::R R:::::RBB:::::B B:::::BUU:::::U U:::::UUS:::::S SSSSSSS ZZZZZ Z:::::Z O::::::O O::::::O R::::R R:::::R B::::B B:::::B U:::::U U:::::U S:::::S Z:::::Z O:::::O O:::::O R::::R R:::::R B::::B B:::::B U:::::D D:::::U S:::::S Z:::::Z O:::::O O:::::O R::::RRRRRR:::::R B::::BBBBBB:::::B U:::::D D:::::U S::::SSSS Z:::::Z O:::::O O:::::O R:::::::::::::RR B:::::::::::::BB U:::::D D:::::U SS::::::SSSSS Z:::::Z O:::::O O:::::O R::::RRRRRR:::::R B::::BBBBBB:::::B U:::::D D:::::U SSS::::::::SS Z:::::Z O:::::O O:::::O R::::R R:::::R B::::B B:::::B U:::::D D:::::U SSSSSS::::S Z:::::Z O:::::O O:::::O R::::R R:::::R B::::B B:::::B U:::::D D:::::U S:::::S ZZ:::::Z ZZZZZO::::::O O::::::O R::::R R:::::R B::::B B:::::B U::::::U U::::::U S:::::S Z::::::ZZZZZZZZ:::ZO:::::::OOO:::::::ORR:::::R R:::::RBB:::::BBBBBB::::::B U:::::::UUU:::::::U SSSSSSS S:::::S Z:::::::::::::::::Z OO:::::::::::::OO R::::::R R:::::RB:::::::::::::::::B UU:::::::::::::UU S::::::SSSSSS:::::S Z:::::::::::::::::Z OO:::::::::OO R::::::R R:::::RB::::::::::::::::B UU:::::::::UU S:::::::::::::::SS ZZZZZZZZZZZZZZZZZZZ OOOOOOOOO RRRRRRRR RRRRRRRBBBBBBBBBBBBBBBBB UUUUUUUUU SSSSSSSSSSSSSSS D U N G E O N G E N E R A T O R Dungeon Generator is a random dungeon map generator, an external Windows tool separated from the roguelike game Zorbus. - It can be used to generate tabletop RPG -style maps. - There's a step-function whichs adds one area at a time if you're interested in seeing how the algorithm works. - There are several different map coloring themes. - Maps can be exported to PNG-files. - There's also a mass generation function that automatically generates a wanted number of maps and exports them. Since this is mostly just a by-product of the game, I won't be spending too much time developing this further. This is and will stay closed source. If you are a game developer, you might be interested in this: http://www.zorbus.net/bts/zorbus_vaults.zip It's a collection of all the prefab maps used in the generator, in plain ASCII-format, free to use (CC0 Creative Commons License). Tool homepage: http://dungeon.zorbus.net Game homepage: http://www.zorbus.net Roguelike development related PDF-book: http://building.zorbus.net Mail feedback to joonas@zorbus.net Information =========== - The window can be resized / maximized normally. This also makes the map preview bigger. You can also use F1 to decrease window size, F2 to increase window size. - MASS-button automatically mass generates and exports maps. Pressing ESC cancels the process. - Brown blocks are doors, yellow blocks are secret doors. - To use the step-function: - START STEP-MODE initializes the step-mode / clears current dungeon. - STEP tries to add one new area. - FINALIZE STEP-MODE does various finalizing things to the map (deadend removal, adds connections between areas, etc.) - Step-mode shows new area spawning points. - You can adjust the area chances if you check USE CUSTOM SETTINGS. - Warning! There's some sanity checking for the values, but it's easy to get the generator to crash. This tool uses the game's code without modifications, and expects the values to be sane. - There are several preset settings in the dropdown-list. You can save your own settings. - RESET restores default settings. - "Chance" = chance to create this area type. - "Seq" = percentual chance that a same type of area will be spawned from this area. - "Max" = max amount of this area type to be created (0 = no limit). - Even if you set certain area type chance to 0, it may be created in the finalizing stage. For example, small rooms are easier to fit when adding hidden areas, corridors are used for connecting areas, etc. Hotkeys ======= F1 Decrease window size F2 Increase window size F5 Generate dungeon F8 Start step-mode / Clear current dungeon F9 Step F12 Finalize step-mode Ctrl+O Open tool folder Ctrl+S Export map (shows no indicator) The algorithm ============= The dungeon building algorithm used in Zorbus is based on an article written by Mike Anderson, posted to Darren Hebden's Roguelike News website back in 1999. The article can be now found at RogueBasin: http://www.roguebasin.com/index.php?title=Dungeon-Building_Algorithm The algorithm is very simple, easy to implement, and ensures that every area is reachable. The algorithm makes it easy to control the amount of different area types, especially corridors. Here's the algorithm how Mike explains it: --- In this algorithm a "feature" is taken to mean any kind of map component e.g. large room, small room, corridor, circular arena, vault etc. 1. Fill the whole map with solid earth 2. Dig out a single room in the centre of the map 3. Pick a wall of any room 4. Decide upon a new feature to build 5. See if there is room to add the new feature through the chosen wall 6. If yes, continue. If no, go back to step 3 7. Add the feature through the chosen wall 8. Go back to step 3, until the dungeon is complete --- Marks I do step 3 a bit differently. After adding a new area to the map, I add new area spawning points to all sides of the area. In reality, the marks are added to a list, but for debugging and visualization purposes I also set the marks to a debug layer of the map. When deciding where to build next, the generator randomly picks a point from the list. I call these connection points "marks". For example, when you add a room, add a connection point to all sides of the area excluding the source point side (so, a total of 4 points if it's the first area of the dungeon, 3 otherwise). The exact mark location is randomly chosen. I won't add marks to points too close to map edges. Prefabs have marks set in a prefab editor. Marks have these properties: - X- and Y-coordinate - Direction (1-4 = N, E, S, W) - Master area type - Force area type (optional, force the next area to be of certain type) - Corridor end (set if this point is the dead end of a corridor) Area types The dungeon builder has the following area types: - Corridor (there's a chance that side corridors are automatically added making it a crossroads) - Room - Circular - Ellipse - Polygon (shaped from connecting randomly placed points) - Tunnel (natural formation, like cave, but more longish, tunnel-like shape, chance that a cave is added at the end point) - Cave (natural formation) - Special (prefabs, mostly hallways, crossroads, dividers, etc., mostly not used for content) - Vault (prefabs, thronerooms etc. for special content) Tunnels and caves are created with the Drunkard Walk algorithm: http://pcg.wikidot.com/pcg-algorithm:drunkard-walk