Re:Rooms and Mazes: A Procedural Dungeon Generator (2014)
by moomin on Sunday July 28, 2019 @02:35PM
(#20549096)
Dead ends aren't interesting, but they do heighten tension rather effectively if you're being chased. Pillar dancing: yeah, it's tedious, but I do think it's hard to have a game without an ability to reset a fight. And yeah, that's what I meant. The relevance is that, of course, they increase the chances of you getting cut off when things are going wrong.
That's correct. I mostly consider that a feature because I don't find dead ends very fun. Also, if you don't do the dead end pruning, you end up with a lot of them, which is definitely anti-fun.
There's an easy refinement you could do if you want some dead ends. Right before the "make sparse" step that removes them, mark a randomly set of dead-end tiles as "unprunable". Then when pruning, those are left alone, which will implicitly also persist the paths leading to them. By controlling how many of these tiles you mark, you can tune the number of dead end paths.
> It also produces extremely few pillars, which could be an issue.
Also a feature if you think pillar dancing is an exploit. :)
The generator can produce pillars, but it's relatively unlikely to.
> Looking at it, I don't think it ever generates crossroads, though.
By this, do you mean a four-way intersection? Yeah, now that you mention it, is looks like the maze generator doesn't often generate those. I think it could, but is unlikely to.
That's also easy to tweak. I believe the main reason is that it was adds to the maze by branching off from the most recently-placed open tile. This encourages long windy passages, but means it's very likely to backtrack to a tile that is already a three-way intersection.
Having it randomly choose a tile instead of, essentially, doing a depth-first traversal, will increase the chances of it picking a tile that's already a T-intersection and turning it into a four-way.