This is my first attempt at implementing the wave function collapse algorithm in Godot. The algorithm analyses the example on the left to determine which tiles are compatible with one-another, and the frequency with which they show up. The algorithm then procedurally populates the output on the right using these rules and weights.

Note: please use Chrome - other browsers might not work.

I found Robert Heaton's article "The Wave Function Collapse Algorithm explained very clearly" really helpful.

Tileset from OpenGameArt.org

Comments

Log in with itch.io to leave a comment.

Hey would you mind sharing the source code? I'm trying to implement WFC in Godot myself but having trouble.

Unable to get property 'getParameter' of undefined or null reference in Windows 10 edge.

No source?