Game dev
WFC Map Generator
Wave Function Collapse tile map generator built in Godot (C#). Generates coherent 2D tile maps from adjacency rules: each cell collapses to a state compatible with all its neighbours. Playable in the browser below.
Wave Function Collapse
WFC treats map generation as a constraint propagation problem. Each cell starts in a superposition of all possible tile states. The algorithm picks the cell with the lowest entropy, collapses it to a single tile, then propagates the constraints to adjacent cells, ruling out incompatible neighbours. Repeat until the whole grid is resolved, or backtrack on contradiction.
This implementation is built from first principles in Godot C#, no external WFC library. The adjacency rules are derived automatically from a sample tileset.