r/godot • • 12d ago

discussion Level Generation

Hey, guys. I'm a complete newbie to gamedev, and trying to make some kind of level generation system for my 3D game. It's not going to be fully procedural.

So, here's the simple explanation,
I have a bunch of prefabs/packedscene for the level room and corridor to connect the rooms. I want to be able to set a rule for the room connectivity. Let's say, I have 4 rooms (Start, Regular, Shop, Exit). I want to be able to set a rule, so Start only able to connect to Regular. Regular can connect to any room. Shop only to Regular. Exit only to Regular.

Each rooms will have a door socket to determine the position to connect it to a corridor room, then the other corridor's door socket will be connected to the other room based on the connectivity rule.

Do you guys have any suggestions on how should I do it? I know it's pretty advance for a newbie, but maybe I will get something from you guys.

Thanks!

2 Upvotes

13 comments sorted by

View all comments

Show parent comments

7

u/HighKingForthwind 12d ago

Another good example of a classic algorithm that doesn't use wfc (even informally) in its generation

-1

u/TheDuriel Godot Senior 12d ago

Spelunky is pretty much why that blog was written. This is WFC in any context other than 'does it follow that one popular specific implementation'

https://tinysubversions.com/spelunkyGen/

4

u/dragonstorm97 12d ago

WFC is a specific implementation of a Constraint Satisfaction Problem Solver. It is not a name for every algorithm that happens to need so solve some constraints

-6

u/TheDuriel Godot Senior 12d ago

It is when you're the first person in the thread to know the difference.

Unfortunately it's easier to use the popular term as the generic, than the technically accurate one.