// the find
emilk/wfc
A C++ port of Wave Function Collapse Tiling
A straight C++14 port of mxgmn's original WaveFunctionCollapse tiling algorithm (the C# project that kicked off the whole WFC procedural-generation trend). Useful for someone who wants WFC in a native codebase without pulling in .NET, or who wants to read a compact reference implementation.
The build is genuinely clever: main.cpp doubles as a shebang shell script that fetches deps, compiles, and runs — clone and execute with zero separate build-system setup. It ships a large set of working sample configs (castle, circuit, rooms, knots, summer tileset) that double as correctness checks when you change the core algorithm. Dependencies are kept small and vendored (stb_image, loguru, emilib) rather than pulling in a heavy stack.
The README says it itself: 'not optimized nor well-documented' and 'could do with some further cleanup' — this is author-acknowledged, not me being harsh. It's locked to the upstream project's October 2016 feature set, and the repo's own last push was December 2022 with nothing since, so any bugfixes or extensions to the original algorithm aren't reflected here. There's no CMake/Makefile, no CI, and no tests — the shell-script-in-main.cpp trick only targets Mac/Linux, so Windows is out. Licensing is split: the code is effectively public domain but the sample bitmaps are explicitly carved out and not covered, so you can't vendor the whole tree into a commercial project without checking image provenance yourself.