How mxgmn/wavefunctioncollapse works
WaveFunctionCollapse is a command-line generator for locally similar bitmap and tilemap outputs. The workflow starts with generation settings, loads either a sample image or tile rules, builds pattern or adjacency constraints, then repeatedly observes and propagates constraints before saving a bitmap (and optionally tile text). The shared model owns the generation loop; the two model implementations prepare their distinct inputs and render results. The README describes rotations/reflections and the observation-propagation algorithm. The graph is based on the shown source and README; configuration and asset contents were not inspected.
Main entry points: Program.cs CLI runner · OverlappingModel.cs Overlapping model · SimpleTiledModel.cs Simple tiled model · Model.cs WFC engine
Components 10
Generation entry
- CLI runner
Program.cs
Generation models
- WFC engine
Model.cs - Overlapping model
OverlappingModel.cs - Simple tiled model
SimpleTiledModel.cs
Input and output
- Run settings
samples.xml - Sample images
samples - Tile definitions
tilesets - Bitmap I/O
Helper.cs - Generated files
Other components
- User
Connections 13
- User → CLI runner: runs
README.md - CLI runner → Run settings: loads settings
Program.cs - CLI runner → Overlapping model: constructs
Program.cs - CLI runner → Simple tiled model: constructs
Program.cs - Overlapping model → WFC engine: extends
OverlappingModel.cs - Simple tiled model → WFC engine: extends
SimpleTiledModel.cs - Overlapping model → Sample images: loads sample
OverlappingModel.cs - Overlapping model → Bitmap I/O: loads and saves
OverlappingModel.cs - Simple tiled model → Tile definitions: loads definitions
SimpleTiledModel.cs - Simple tiled model → Bitmap I/O: loads and saves
SimpleTiledModel.cs - CLI runner → WFC engine: runs model
Program.cs - CLI runner → Generated files: saves results
Program.cs - WFC engine → Generated files: renders via model