Using Wave Function Collapse to solve puzzle map generation at scale

23 greentec 1 6/23/2025, 12:42:34 AM sublevelgames.github.io ↗

Comments (1)

greentec · 4h ago
I hit an interesting problem with my puzzle game Logic Islands - 3 out of 6 rulesets would hang forever trying to generate maps larger than 7x7.

The trick that worked? Using Wave Function Collapse, but choosing what to generate based on each ruleset - islands for some, walls for others. This flexibility made complex constraints (like "no 2x2 blocks") trivial to express as tile connection rules.

My favorite result: the "Minimal" ruleset enforces "all wall regions must be exactly 3 cells" using just 11 tiles and local WFC constraints. No post-processing needed.

Now generates 12x12 maps instantly instead of hanging forever.

Anyone else using WFC for logic puzzles beyond typical texture synthesis?