rkcf / gdDiggerDemo

A demo of digger based procedural level generation in godot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:GDScript 100.0%