itch.io is community of indie game creators and players

Devlogs

Added Wave Function Collapse

Toy Wave Function Collapse with Patching
A browser game made in HTML5

I implemented the actual Wave Function Collapse algorithm into the generation. I needed to make some tweaks to make it work with this toy example. I needed to make it so that the highest value tiles are not allowed to be next to themselves or else it would get stuck on just one color. I also needed to cap the entropy of a tile or else it would, again, get stuck on a single color.

The final step for a complete example is to implement patching, and that needs to be handled carefully or it could turn into an infinite loop.

After this is feature complete, I'm looking into adding non local constraints, which would allow me to program in larger structures, directional constraints, and position based weight variance, which could seed areas to be of higher or lower value.

Files

  • Wave function collapse with no patching 17 MB
    May 11, 2021
Download Toy Wave Function Collapse with Patching
Leave a comment