Procedural generation of dungeons

Godot Version



Hello! I’ve been curious about implementing procedural generator of dungeons, I’ve got the idea, but I don’t know how to implement it.
Here’s the idea:

  1. Generate the noise (small size)
  2. Round it to black and white
  3. Save it to resource or scene
  4. Generate more rooms like that based on random number of rooms
  5. Place the rooms on the grid by randomising positions
  6. Make connections between rooms
  7. Place monsters, chests, etc.

Problems with the alghoritm:

  1. How to make the alghoritm distinguish outline or the future “walls” of that rooms?
  2. How to make alghoritm fix double walls, like pipe with width of 2 px?
  3. How to make the alghoritm know what tiles of tileset are the walls, and what tile to use is certain situations?
  1. Walls would be tiles were the neighbouring color of the noise is different to the one you are checking
  2. What exactly do you mean by that?
  3. you can use autotiles, heres a tutorial example for you:
  1. When there is some fragment of room where is some convex of 2 tiles which is surrounded by void on 3 sides, alghoritm will recognize it as wall. What you get is unplayable fragment with double walls and nothing between two walls.

I think i need a visual example to understand what you mean