As the Dungeon in Lament will be procedurally generated, it is essential I dive deep into researching procedural generation. Whether it be general design processes when it comes to designing the generation; examples of existing games; game design methods etc. It will all be documented in this post.
Although Lament clearly takes inspiration from the roguelike game ‘The Binding of Isaac’, I believe it would be beneficial for me to look into procedural room generation as a whole to begin.
Practical Procedural Generation
In this 2017 GDC talk, Kate Compton, the developer behind Tracery, breaks down the surprisingly simple algorithms used in procedural content generation. She explains how to use basic data structures to create complex, flexible, and scalable content-generators that are more powerful than you’d expect.
After watching this talk on general procedural generation, there were key takeaways that I got from this talk:
- Know what you’re making
- The more detailed the generator you are making the more rules you can create
- More rules results in a more specific and therefore better generator
- Understand your generator
- Enumerate (create variables for) your constraits
- Additive and subtractive methods
- Build up a space of good stuff
- Remove bad stuff
- Parametric vs interpretive
- Parametric – Generation based off of variables and constraints
- Interpretive – Run an algorithm to process simpler data into some other data
How (and Why) Spelunky Makes its Own Levels
In this video, Mark Brown looks into how creator Derek Yu strikes a balance between random and authored levels to make stages that always feel fun and fair – and why it’s important that this game never gives you the same level twice.
Spelunky is a game with fantastic procedurally generated levels and (releasing in 2008) came out before The Binding of Isaac; being one of McMillen’s foremost inspirations for his game. These were the key takeaways I had from this video:
- Tiles
- Break different parts into regions
- Connect easier
- Pathing
- The player must be able to complete the level despite the ‘randomness’
- Generate levels from ‘start’ to ‘finish’
- ‘Fake’ randomness
- Pre-designed assets that make the game more ‘playable’
- Special item(s)/resource(s) in rooms are designed to be more accessible
Edmund McMillen on The Making of The Binding of Isaac
In this video, Jack Packard interviews Edmund McMillen, the creator of The Binding of Isaac. McMillen, in this interview, talks about certain methodologies, inspirations and design decisions he made in order to create The Binding of Isaac.
After hearing directly from the creator of The Binding of Isaac, which is a key inspiration for Lament. These were the key takeaways from this interview:
- Grid-based layout
- Isaac is based off of a grid system where rooms are connected by doors in cardinal directons
- Ensures a valid path for the player to get to the ‘exit’
- Room Templates
- Pre-defined room templates that are designed by the developer(s)
- Containing different enemy(s), item(s), door(s)
- Special room types
- Boss rooms – A final enemy that leads to the end of the level
- Treasure rooms – Rooms that provide the player with special item(s)/resource(s) that will help them with their progression
How should my Room Generation Work?
Based off of the research I have done on Procedural Room Generation, I feel that there are 6 key aspects that I must implement in order to have a working and efficient Room Generation System for Lament’s dungeon:
- Predefined Room Templates
- Large collection of predesigned rooms that can then be used as smaller pieces of a larger dungeon
- Rooms vary slightly – Doorways, Item(s), Enemy(s)
- Grid-based Layout
- Rooms are connected by doors in a cardinal direction
- Rooms are randomly generated on the grid ensuring there is a path to the end
- Procedural Layout Generation
- Generation starts with rooms being connected to each other
- Key rooms must always be accessible from the start room
- Randomized Elements inside Rooms
- Enemy spawns/types
- Item(s)
- Obstacle(s)
- Special Room Types
- Treasure rooms – Providing the player with items and resources
- Boss rooms – Rooms with a much harder enemy that leads to the ‘exit’, these rooms will be furthest from the spawn room for progression’s sake
- Difficulty Progression
- Rooms are made harder depending on what level of the dungeon the player is on
- The player must grow in strength/develop as they progress through the dungeon
- Enemy stats, numbers etc.