Skip to content

A demo of digger based procedural level generation in godot

License

Notifications You must be signed in to change notification settings

rkcf/gdDiggerDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gdDiggerDemo

./common/assets/screenshot.png

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:

  1. Pick starting square (somewhere around the middle)
  2. Place a room digger at this location and dig a room out
  3. Generate a random number of corridor diggers in the newly created room. They will dig random corridors out
  4. 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

Ideas

  • 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

About

A demo of digger based procedural level generation in godot

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published