Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

My easy 3-step dungeon generation algorithm using Godot Tilemaps: 1️⃣ Spawn random rooms, merge overlapping rooms 2️⃣ Merge rooms with corridors until all are merged 3️⃣ You're done! ✌️ I don't get why people overcomplicate this 😅

17,891 görüntüleme • 1 yıl önce •via X (Twitter)

30 Yorum

Robin | Game dev ᕕ(ᐛ)ᕗ profil fotoğrafı
Robin | Game dev ᕕ(ᐛ)ᕗ1 yıl önce

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? :)

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

People like walking simulators, no? 😅

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

And of course everything is configurable to support bigger maps or rooms:

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

Walking through a generated dungeon:

thefernando profil fotoğrafı
thefernando1 yıl önce

realy like this style I should make things in this style.

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

Thank! I would say: Go for it! 😁

thefernando profil fotoğrafı
thefernando1 yıl önce

nice stuff I love when I see people simplifying things instead of over complicating them.

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

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

GIGASWORD ~ Wishlist Now! profil fotoğrafı
GIGASWORD ~ Wishlist Now!1 yıl önce

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

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

No problem! 😁

Svambo profil fotoğrafı
Svambo1 yıl önce

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 ...

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

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. 😁

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

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

Redbaboon Games profil fotoğrafı
Redbaboon Games1 yıl önce

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 profil fotoğrafı
mrimvo1 yıl önce

Classic Nethack style.

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

Yeah, just rectangles and some lines between them!

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

Makes sense 😅

Johannes Ebner profil fotoğrafı
Johannes Ebner1 yıl önce

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

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

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.

Johannes Ebner profil fotoğrafı
Johannes Ebner1 yıl önce

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? 😂

Johannes Ebner profil fotoğrafı
Johannes Ebner1 yıl önce

IOW: If you say it's simple, I think you're either underplaying your skills or you're arrogant. Having met you personally, it's the first, as you're not arrogant 😂

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

Ok maybe you're right 🤔 I do have some classes set up that have a notion of what a room and a corridor are and a class that can merge any number of these rooms and corridors. Maybe I'm underestimating the complexity 😅

Speiger profil fotoğrafı
Speiger1 yıl önce

That only works if your working with a 100% dynamic system. Where spawns etc are not user defined. Or as a tool to build templates that you can then edit. But the moment you want to have a set of handcrafted rooms that are then dynamically layed out then your approach fails.

spaceghost e/🇺🇸 profil fotoğrafı
spaceghost e/🇺🇸1 yıl önce

corridors and rooms is classic but unless u like that like cartography crawlers people like a bit more variation besides single-tile one-path corridors and rooms i personally love this style, i still play castle of the winds

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

Yeah, I guess it also depends on how long they have to play the game 🤔

Joseph Ensminger profil fotoğrafı
Joseph Ensminger1 yıl önce

Can you make the code/scene available?

zbigniewcebula profil fotoğrafı
zbigniewcebula1 yıl önce

Because your algo sucks.

Sander Vanhove profil fotoğrafı
Sander Vanhove1 yıl önce

Well, that's not nice 🤔

zbigniewcebula profil fotoğrafı
zbigniewcebula1 yıl önce

Yup, it happens.

RedDeer.Games profil fotoğrafı
RedDeer.Games1 yıl önce

🚨 New HIT on Nintendo! 🚨 🎮 My Cozy Room – the ultimate sandbox game to unleash your creativity! 🛋️Design dream spaces with 500+ furniture items & 30+ styles. 👉 Play now: #Nintendo #Indiegames #RedDeerGames #MyCozyRoom

Benzer Videolar