My easy 3-step dungeon generation algorithm using Godot Tilemaps:
@SanderVhove4.9K followers
17,891 views
30 Comments
Comments from the original post on X (Twitter)

@niuage
Maybe they complicate it because they dont want players to have to go through a corridor that's 20 tiles long, when most rooms are like 4 tiles high? :)
7 likes

@SanderVhove
People like walking simulators, no? 😅

@SanderVhove
And of course everything is configurable to support bigger maps or rooms:
5 likes

@SanderVhove
Walking through a generated dungeon:
7 likes

@_thefernando
realy like this style I should make things in this style.
1 like

@SanderVhove
Thank! I would say: Go for it! 😁

@_thefernando
nice stuff I love when I see people simplifying things instead of over complicating them.
2 likes

@SanderVhove
Exactly! People, and especially programmers, like to overthink systems from time to time 😅

@Hybrid_Games_
I always love finding new ways to approach dungeon generation, thanks for posting this!
1 like

@SanderVhove
No problem! 😁
1 like

@TherealSven2
How does your corridor algorithm work? I'm working on something like this atm and it works pretty well most of the time, but in some rare cases I get 2 separate unconnected dungeons ...
1 like

@SanderVhove
I have classes for a room, a corridor and a merded collection of rooms and corridors. So I basically take one random room and connect it to another random room with a corridor. Put all of that in a merged collection. Repeat until everything is merged into one big dungeon. 😁

@SanderVhove
Do you think the content of the rooms could make up for the randomness?

@RedbaboonGames
Maybe, the problem is, actually its too much random, the rooms have to be more logic in therm of size, also remember the sizes of the sprites if the generated dungeons, rooms are too small it can be problematic.

@mrimvo
Classic Nethack style.
1 like

@SanderVhove
Yeah, just rectangles and some lines between them!
1 like

@SanderVhove
Makes sense 😅

@Structed
The complexity is still in the spawning rooms & connecting part, isn't it? I mean you need an algorithm with quite a few constraints.
1 like

@SanderVhove
My algorithm just takes a random square in both rooms it's trying to connect and then put a corridor there 😅 It's really naive.
1 like

@Structed
Do you have any checks on what is a valid room? A valid corridor? How many bends a corridor should have at least? How do you check for connections? 😂
1 like




