Three Hundred :: Mechanic #160 Sites:     Webcomics   |   Three Hundred Mechanics   |   Three Hundred Prototypes
 Three Hundred
   - Index Page
   - About...
   - By Year

   - Comp-Grid
   - Procedural
   - Tactics
   - Tiny Crawl
   - Misc

PreviousMechanic #160Next

  Mechanic #160 - PGC: Puzzle Tree Building - Zones
Posted: 10/11/12

Advanced techniques for procedurally generating more complex puzzle trees, focusing on the usage of themed zones and locked doors.

  1. Begin With World Skeleton

This entry is based on material published as a
Blind Mapmaker article on March 18, 2011.
I'm going to take the basic approach used in [#159 - PGC: Puzzle Tree Building] and I'm going to make it slightly more complicated. However, in doing so, the result is going to be significantly more interesting.



Fig 160.1 - The New World Model.

The first thing that is changed is how the world is structured. Like before, the world is created before this process begins. However, it is now made up of multiple themed zones (ice cave, forrest, etc). The rooms are still prefabs, but because they are now themed, they can only be used in the similarly themed zones. You won't find an ice cave room inside of the forrest. This also means that the puzzle nodes are also themed and similarly exclusive.

Below the map skeleton is a small chart that keeps track of relative information. This chart will be updated as the process works its magic, but right now, the main thing to take away from it is that each zone has a number of slots on the puzzle tree using that magic 50% puzzle density. If a zone has 12 rooms, it can have 6 puzzles in the puzzle tree. Again, both the start and finish puzzles will count towards this number, even though they will be in different zones.

Also of note is that the chart is listed in the reverse order the player is expected to visit the different zones. Here, the player begins in the Charred Lands. His first key will unlock the Forrest. Then the Ice Cave. And finally, Brimstone. Though not required, it's just a nice touch to put the start room in the Charred Lands and the finish room in Brimstone.



Fig 160.2 - Bridge Room.

One other change here is the addition of Bridge Rooms. These are directional rooms (east-west, or north-south) that contain a single, optional locked door that bridge one zone to another. Basically, these are the puzzles the player must solve in order to get into the next zone. They have associated puzzle nodes which will be inserted into the puzzle tree at specific points, but they feature a few unique features:

- The puzzle nodes come from the rooms, unlike how the rooms typically come from the puzzle nodes.

- The puzzle nodes are implied, but optional for all zones except the first one.

- Bridge puzzle nodes do not count towards the puzzle limit for any zones. (Therefore, the puzzle tree created above will have a total of 6 + 5 + 5 + 7 + 3(bridges) puzzles, or 26 nodes).

  2. Select Start Room



Step 2.

The first real step in the process is very similar to what was described before. You select a root node (the final story dungeon puzzle) to begin the tree, then add its room to the map. There are two differences now.

1. Puzzles and rooms are now themed, therefore the selection of the puzzle must match the zone it is put in. Since the Brimstone zone is the last visited zone, I would pick from the available Brimstone final puzzles. Notice that the node in the puzzle tree is red to indicate that it is associated with that zone.

(Due to the fact that you can encounter puzzles before you need to solve them, you can put the final room in ANY zone. I only put it in the last zone because it feels more appropriate)

2. When you add the puzzle to the tree and room to the world, increment the number of puzzles for that particular zone on the zone chart (see the 1/6? That means Brimstone can only hold 5 more puzzles).

  3. Add Nodes



Step 3.

Now, it is time to populate the puzzle tree with your first node. Similar to above, grab a puzzle node from the available puzzles for that particular zone, place the room, and increment the puzzle counter for that node.



Step 3-2.

Here's where it gets interesting. You do not have to select from the same zone. You can pick from any zone on the chart at or below the lower most unlocked zone. Since no zones are locked yet, this means I can pick from any zone Brimstone or lower on the chart.

The one requirement is that the zones fill up from top to bottom. This is because the locked door will require at least one slot from the next lowest zone. As long as you prioritize higher zones over lower zones, filling up top to bottom, this technique should work.

(It should be noted that putting puzzles really far away from each other geographically is kind of annoying. Puzzles A and B are about as far away as you can get. Either employ quick travel or teleports, or prioritize puzzle selection to be from neighboring zones to help).



Step 3-3.

Continue populating the tree until the top most zone is filled with puzzles. Feel free to use leaf nodes. Just make sure you never completely close off the tree. I'd probably use a leaf node if there were at least 3 open links.

  4. Lock the Zone



Step 4.

The next step after filling up a zone is to lock it. Here, you just grab the puzzle associated with the bridge leading TO that zone, and add it to the puzzle tree.

The trick here is that, as long as all the nodes in the lock's subtree come from zones that come before it (see [#004 - Environment Tree], then you'll produce a winnable solution. This is enforced by making sure that the zones are filled top to bottom, in order.

However, if you want to ensure that the zones are visited in the specified order, make sure that at least one node below the lock comes from the immediate next zone. This will make sure that Ice Cave must be unlocked before Brimstone.



Step 4-2.

Now, repeat step 3 until you fill up the second zone's puzzle limit. Then add the lock to zone 2 to the puzzle tree. Continue doing this until you've locked all the zones except the last one (which has no lock). Stop when the number of dangling links is equal to the number of puzzles left in the final zone.

  5. Close the Tree, Add Start Room



Step 5.

At this point, all you need to do is close off the tree by adding leaf nodes, making sure that one of those leaf nodes is the starting room node.

  6. Fill In Empty Slots With Filler Rooms



Step 6.

Last, but not least, add filler rooms to all the empty slots in the world skeleton. You are now done. You've created a world made up of four zones, with a complex puzzle tree that includes solvable locked doors. That's not nothing. Congratulations, you just procedurally designed a puzzle dungeon.



Copyright 2007-2014 Sean Howard. All rights reserved.