An example project using digger algorithms for procedural level generation.
There are two types of diggers implemented here. A RoomDigger and a CorridorDigger. RoomDiggers dig and create rooms, while the CorridorDigger makes pathways and corridors between rooms.
The basic algorithm is as follows:
- Pick starting square (somewhere around the middle)
- Place a room digger at this location and dig a room out
- Generate a random number of corridor diggers in the newly created room. They will dig random corridors out
- A new room digger is spawned at the end of the corridor.
This cycle then repeats for a set number of generations to generate the full level
MIT Licensed
- Add a noise layer that serves as an attractor for turning direction preference. May allow for more natural looking room systems.
- Prune unneeded spindly hallways
- As corridor digger tunnels around, they stop and think to themselves: is this a good place to build a room? If so they destroy themselves and spawn a room builder
- save preset and reload previous preset when starting a new instance
- add function for corridor digger back fill corridor