I really like procedurally generating levels. As a programmer, if I can design a level by hand once, I’d much rather just take those rules that I used to design the level, put them in a program, and then I can generate a bunch of levels automatically!
Of course it isn’t so easy. Putting all my design rules into code turns out to be a lot of work! Here’s an example.
Part of making dungeon levels, particularly at high levels, involves adding secret doors. In this case, sometimes I will add a secret door hiding an exit from a level. Like this:
![](https://www.prankster.com/wp/wp-content/uploads/2019/12/blogdoor1-1024x640.jpg)
But wait, if you walk down the stairs to this level, you will immediately be faced with a blank wall! In fact, I’m not even sure that the party placement logic will properly handle placing the player characters in this situation; some might end up on one side of the wall, and others on the other side!
The fix is “easy”, of course; don’t create a secret door at the level exit. But just a reminder that the rules to create a dungeon are not as simple as you might imagine. Here’s the fixed version:
![](https://www.prankster.com/wp/wp-content/uploads/2019/12/blogdoor2-1024x640.jpg)