Zelda-style Dungeon Generator
This is a method to randomly generate a branching dungeon graph that can be used to emulate the traditional lock-and-key style of dungeon that is prominent in the Legend of Zelda series of games.
This is based on a grammar I found a while back, that I cannot find an active link to any more. I remember the name of the guy who wrote the paper was named Dorman. I created this a while ago. I have included the instructions in the image itself so that it can be downloaded and used stand alone. Below I have an example of how it is used.
So in the example, I am replacing the 'OL(i1)' (in the green box on the first graph). I rolled a 4 so I use the sequence that is in the red box. OL takes a parameter (the 'key ?' on the diagram above). In this instance, 'i1' is provided, so I replace the '?' in the red box with 'i1', and connect the blue and teal nodes properly, the result is two nodes (in the blue box) added to my final graph. Of note in the final graph is the chain 'OL(!)<->UI(hp)', that represents a portion of the dungeon that cannot be entered unless the player has an item that is not provided in this dungeon. If the player comes back when he or she has that item, they can eventually get an extra heart piece.
Very cool. I remember taking a run at implementing this when I first saw the paper, but got sidetracked onto another project. Absolutely I'll be taking a look at this.
I still have the PDF of the paper kicking around somewhere. I'll see if I can find it when I get home.
Not Registered Yet? No problem.
Do you want Strolenati super powers? Registering. That's how you get super powers! These are just a couple powers you receive with more to come as you participate.
- Upvote and give XP to encourage useful comments.
- Work on submissions in private or flag them for assistance.
- Earn XP and gain levels that give you more site abilities (super powers).
- You should register. All your friends are doing it!
? Responses (6)
This is a Quest waiting to be created!!
Bonus points for leading me to Joris Dormans and I read a bit and watched a presentation. I actually love these kind of formulatic/algorithm type building blocks and was thrilled to see this. The graphics are great!!
I don't really follow - I may be getting old since I need you to show all the steps in your example.
So, the first graph is S->N->e
Looking at DungeonStart, I don't see any with the S->N entry? Did you substitute OM(?)
The example in was not the beginning of the dungeon, it was in the process showing how the process of replacing nodes works. Below is the steps to get to the first part of the example. You can see them visually at: imghttps://i.imgur.com/C5B7C4z.png/img
But let me walk you through it.
I start with DungeonStart 6-10 and process the 'C()' first.
The C 6-10 resolves to Blue<->MO()<->Teal, So now the 'C()' is replaced by 'MO()'.
There is only one option for MO() so I go ahead and replace the MO() on the graph with the expanded version.
Next I move on to the 'MI(i1)' node. MI 11-20 is Blue<->S()<->? with a one way loop back to the Blue node (representing the shortcuts that some Zeldas provide back to the head of a branch once you have completed that branch.
Resolving the 'S()' ends up with swapping the 'S()' node for an 'e' node. And now the dungeon is in the state of the example above.