/WaveFunctionCollapse

Simple WaveFunctionCollapse implementation. Created for understanding and learning! Based on: https://robertheaton.com/2018/12/17/wavefunction-collapse-algorithm/

Primary LanguageC++

WaveFunctionCollapse

My WaveFunctionCollapse implementation in C++. Currently only the SimpleTiledModel.

Installation

Extract the zip file anywhere.

Running

The executable takes 3 arguments:

  1. Path to example map file (assets/example_map/testmap.csv)
  2. Path to output rng maps (assets/output_maps)
  3. Path to colormap file (assets/example_map/testmap_colors.txt)

PowerShell:

.\WFC.exe .\assets\example_map\testmap.csv .\assets\output_maps .\assets\example_map\testmap_colors.txt

Extras

  • assets/example_map/testmap.json - is a Tiled editable map
  • assets/example_map/colors.png - Used to build test map in Tiled.