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

Rated 5.0 out of 5 stars
(6 total ratings)
AuthorMartin Donald
Tagsdemo, Godot, Procedural Generation, Tilemap, Tileset


Log in with to leave a comment.

Broken : Cannot read properties of undefined (reading 'getParameter')

Thanks for linking the wave function collapse article!


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?