Generating Jaquaysed Dungeons (1) | Design Workshop
Generating Jaquaysed Dungeons using a handful of dice and simplified Computer Science algorithms.
Quick Reference
- Roll x dice onto the page/area.
- Draw a grid of non-overlapping triangles and add the sum of the rooms' value to each edge.
- Create a path from one room to the next, using the smallest value edges.
- The (# of rooms / 5, round up) lowest value rooms are the entrance.
- The dead end rooms have encounters (?).
- Convert the (# of rooms / 3, round up) highest edges from Step 2 into paths.
- The remaining dead end rooms have valuables ($).
- Add Final Touches:
- Determine if "Lock and Key" or "Gauntlet" Dungeon, then place Goals and other POIs as instructed.
- Convert paths between 2 rooms with the same POI into a secret path.
Problem:
For whatever reason, you need to make a "Dungeon" fast, but you also want it to feel intentionally designed.
The Drop Dice Method handles room placement, but expects you to build the rest of it. Wallet Dungeons is better, but offers no guidance on how the rooms should be connected, only limits.
Meanwhile, Cyclic Dungeon Generation creates graph-based adventuring sites with actual pacing and level design, but can only produce a limited version of a Jaquaysed Dungeon.
(A) Solution:
Rogue-likes traditionally use random room placement and path-finding algorithms for dungeon generation, and the original Cyclic Dungeon Generation was a custom built algorithm for a throw-back Rogue-like dungeon crawler.
Thus, using the above's strengths, some fancy Algorithms, and Graph Theory, we can generate our own Jaquaysed Dungeons.
The Procedure:
1. Room Placement
- Grab x dice of any kind; x = # of rooms/areas.
- Roll the dice on a piece of paper/designated area.
- If a die lands outside the page/area, re-roll it until it is on the page/area
- Mark each die and its value as a room.
2. The (Bootleg Delaunay Triangulation) Grid
- Use the Rooms to create a grid of non overlapping triangles
- Start with the closest trio of rooms.
- Draw a triangle from those three rooms.
- Repeat with the next closest trio of rooms until no more triangles can be made.
- Take one room of an existing triangle and draw a line to either the closest room of another triangle, or an orphaned room.
- Repeat until all rooms are a point of at least one triangle.
- Note: lines are not allowed to cross over each other.
- Mark each edge with the sum value of its connected rooms.
3. Create a Guaranteed Path with a Minimum Search Tree
- Choose any room, and mark it as visited (e.g. the circles around the dice).
- Then:
- From all visited rooms, choose the smallest value edge.
- Tiebreaker: Choose the edges with the physically closest rooms.
- Using that edge, make a path between the visited room to the new room.
- If the new room is already visited, choose the next smallest edge.
- Mark the newly connected room as visited.
- Repeat until all rooms are visited.
- Mark the x smallest value rooms as the start/dungeon entrance.
- x = # of rooms / 5, round up.
- Tiebreaker 1: Choose the room with the most paths connecting it.
- Tiebreaker 2: Choose the room with the highest value neighbors.
- Mark all dead ends as a fixed encounter (?).
4. Adding Loops
- From the highest to lowest value, turn x edges from step 2 into paths.
- x = # of rooms / 3, round up.
- Overachiever Option: x = (3r - k - 3)L - r + 1, round up.
- L = (1d10 + 60) / 100, higher values mean more added paths.
- Any value from 0 to 1.0 will work, I prefer somewhere around 0.6 to 0.7.
- r = # of rooms
- K = # of outer edges of the grid in step 2 (the circumference essentially).
- Tiebreaker: Choose the edge with the physically closest rooms.
- Append remaining dead ends with non-goal related valuables ($).
5. Final Touches: Using Graph Rewriting to Add Goals, Locks, and Secrets
- Determine if dungeon is a "Lock and Key" or a "Gauntlet" style dungeon:
- If there is a dead end room connected to a starting area:
- That room becomes the goal of the dungeon/area
- Tiebreaker: Choose the highest value room.
- The obvious path to that room is "Locked" in some way.
- The key(s) to "Unlock" it are the room(s) furthest away from all starting rooms.
- That Starting room becomes the "Straightforward" Entrance.
- Otherwise:
- The goal of the dungeon/area are the room(s) furthest away from all starting rooms.
- Convert the paths between 2 rooms with the same POI (Starting Rooms, Goal Rooms, Key Rooms, etc.), into a secret path:
Dev Notes
Inspirations
Pros
- "Minimal" Rolling: just chuck a handful of dice like any other drop dice dungeon and you are good.
- Flexible: can be used for standard adventuring sites, city crawls, continental campaigns to get the world saving MacGuffin, etc.
- Computable: With some modifications to the procedure (e.g. the commonly used algorithms for things such as the Delaunay Triangulation Grid), this generator should also work well for video game development.
Cons
- O(n^2) Runtime: Thanks to the specific process for Step 2, it takes exponentially more time to create a dungeon the more rooms you have.
- The biggest dungeon I've ever generated was 31 rooms, it took about 1-2 hours to fully generate the layout.
- Note: Competently made Delaunay Triangulation algorithms are significantly faster then my method, but are not built to be meat compiler friendly.
- Twists: While the generator does guarantee sensible routes to the goal, it is currently missing interesting ideas from Cyclic Dungeon Generation such as the Monster Patrol or the Altered Return cycles.
- Treasure Population: There is a non-zero chance that a dungeon will generate with 0 treasure, especially with smaller dungeons. Additionally, treasure will always be in an encounter room.
Hacks
Room Details
Using the black and white version of Wallet Dungeons, you can easily populate the map with room details. It also contains methods for generating encounter types and room connection details, but its results can contradict what has already been generated.
Progression
You can use the distance from (a) starting room's value as a way to pace dungeon progression, such as:
- Using the distance as a modifier for encounter tables or reaction rolls.
- Determining where and what order to put information/story elements.
- How difficult/deadly fixed room encounters can be.
A Traditional Mega-dungeon
- Roll x dice for each Sub Area of the Mega Dungeon.
- A Sub Area is a Dungeon in itself, with the starting rooms being exits from the previous/same level dungeons, and goals being entrances to the next level/area.
- Follow the procedure as normal, except:
- Level 1 is the Starting/Entrance Area with the highest value neighbors; ties mean there are multiple Level 1 Entrances.
- The Goal is the Ultimate Reason for entering the dungeon; life changing wealth, defeating the BBEG, saving a loved one, etc.
- The Levels of other Sub Areas levels are 1+ the distance from a Level 1 Area.
Final Word
It may not look it, but I have spent the last couple of months working on and refining what was supposed to be a quick proof of concept. While I recognize that there are still missing features with this generator, it is long past time for me to stop tinkering, publish the blog, and listen to your feedback.
Either way, thank you for reading this, and I hope you have a good day!
Either way, thank you for reading this, and I hope you have a good day!
This work is licensed under CC BY 4.0
Comments
Post a Comment