
DUNGEON SPAWNING

HOW IT WORKS:
The Adventures of Nandy 2 uses a constructionist, constraint-driven approach to generating dungeons. First, it plans the dungeon layout one room at a time. Dungeon plans can be rejected for a variety of reasons, but eventually a layout is generated that is viable and fits all constraints.
​
The game display size is 384 x 216 world units, and the dungeon layout is planned in screen-size blocks. Some rooms can vary in size and layout, while others are fixed. The following sequence is always followed:​
Generating dungeons and looking at the layouts in view mode
​
1. Player starts in a room with three candelabras



​2. This is followed by a hallway with skeleton enemies​



3. At the end of the hallway, the player encounters one of four fallen heroes, each with unique dialogue (hero sprites were repurposed from Final Countdown)​



4a. The dialogue room branches in two directions - one leads to a powerup (either a speed boost or extra heart)



4b. The other path from the dialogue room leads to another powerup (again either a speed boost or extra heart, whichever was not selected for the other powerup room) followed by a large loop-shaped room with spikes and lots of enemies



5. There is a pause in the action after the loop-shaped room - there are three paths from this room, one of which is behind a locked door


6a. One path leads to a shop (don't think about it too hard) where the player can buy up to three powerups - another speed boost, another extra heart, or a spread shot attack


6b. The other unlocked path leads to the key which is guarded by fire-breathing fish


7. Behind the locked door is a long hallway with rows of spikes and lots of enemies


8. The next room contains a mini-boss which is really a paper tiger - its true purpose is to give the player another extra heart (dropped on death) and make the player wonder if that was the end (which would be a letdown)

9. The real end boss, Xorgon, follows immediately after the miniboss (his most prominent references are Digdogger from the original Legend of Zelda and Phantoon from Super Metroid)

10. The final room contains a crystal (the "plot" is that Nandy has to prevent Xorgon from getting "the crystal" to save "the kingdom"). When the player collects the crystal, there is a very brief ending (mostly spoofing the ending to the original Super Mario Bros) and a new dungeon is generated.
