AlexeyBond / godot-constraint-solving

WFC (Wave Function Collapse) and generic constraint satisfaction problem solver implementation for Godot 4
https://godotengine.org/asset-library/asset/1951
MIT License
357 stars 14 forks source link

Big key dungeons #15

Closed dwidge closed 8 months ago

dwidge commented 10 months ago

Hello, to make a lock and key dungeon:

Generate your dungeon with the locked doors.

How to make a series of separate walkable regions with wfc? And maybe also ensure that there is somewhere a certain tile (door) between each A -> A+1 region. And maybe a way to find the door of each region, so a key can be generated and linked to it.

AlexeyBond commented 10 months ago

Hi. Generating global structures, like connected passable regions or series of such, with WFC alone isn't trivial and currently isn't supported in this plugin.

Instead, this addon allows to run another algorithm (called precondition, because it sets initial conditions for WFC) before running WFC to limit what tiles are allowed in what cells. Such algorithm may generate a global structure, like WFC2DPreconditionDungeon does. And after that WFC will consistently fill it with concrete tiles.