Another Wave Function Collapse implementation, this time a mixed-initiative solver which allows you to manually collapse some cells to your liking, leaving the algorithm to fill in the rest.

  • Left-Click on a tile to collapse the associated cell.
  • Set the algorithm speed using the SPEED slider. Turn this down if you want to visualise constraint propagation.
  • Click SOLVE to immediately collapse the wavefunction.
  • Click RESET to reset the wavefunction.

You can learn more about this implementation from this tutorial video I made about the WFC algorithm:

The project files for this implementation are available on my Patreon page:

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 for implementing this.

Tileset from

Rated 4.7 out of 5 stars
(15 total ratings)
AuthorMartin Donald
Tagsdemo, Godot, pcg, Procedural Generation, wave-function-collapse, wfc


Log in with to leave a comment.


Thanks for releasing the demo! I was really hoping I could fiddle with it.