Print Page

Tuesday, April 16, 2019

Thinking out loud about Procedural Generation

DunGen has been around awhile now. The theming tags are a success in making the kind of rooms & monsters used make sense together when applied, but the random placement is still lacking for what I'd like it to be. I think they need at least one more level of tagging that would help organize usage, maybe "inner" versus "outer" for each room label, and a clumping algorithm that tends to make rooms from the same theme clump together adjacently more often, with "outer" room labels being used more around the edges of clumps and inner labels more where they don't border labels from other themes. Still make it all biases and not absolute so there can be serendipitous adjacencies to spice things up. Then do something that creates explicit bosses and groups them and the bigger treasures more in "inner" rooms. Entrances could be made explicit, and be "outer" rooms. I'll need to think about algorithms to get this effect. I'd also like some sort of explicit locks and keys mechanism where some rooms have elements that are made accessible by bringing some item from another room. I'd like to have something of the vibe of the computer game "Unexplored" in that feature. Another pass through adding an attribute to every label doesn't sound like much fun to do, but I think it might be worth it for this effect. It probably would be a good idea to clump creature types somewhat as well.

 So maybe the room count is established, then the graph gets linked up. Then instead of the random rolls for each room, roll up separate lists of room labels, retaining the whole object for each, and a list of monsters (or blanks) and traps (or blanks) and quirks (or blanks) and hooks (or blanks). Sort the lists by monster theme tags and level total, or room theme and inner or outer. Then draw off of these as decks, starting by placing the entrance and several edges away the boss room or boss rooms, which should also be spread apart if of different factions. Then deal out inner room labels in rooms adjacent to boss rooms and outer labels for the entrance and adjacent rooms, and then remaining inner rooms around similar theme inner rooms and outers to fill in the gaps. Some sort of shuffle and draw might place creatures, traps etc, as objects, only rendering out to strings at the end, so the final result is editable by the DM using the tool.

 This is still more ideas than implementation, but I think something along these lines could move DunGen the next step along towards making coherent, useful procedurally generated dungeons with less tweaking needed between generation and worthwhile playability. It's concrete enough for me to start thinking more clearly about implementing it.

Another, back of the mind thing I've been thinking about is doing classic multi-level dungeons, from midi to mega size, with built in side views,  themes for different levels, and linking entrances/exits that jump you from one level map to another. This would probably make more sense to do after a rebuild along the lines above, but keeping it in mind, while working up what goes into a level.