Straight out of quantum mechanics, Wave Function Collapse is an algorithm for procedural generation of images. In this video (recorded over 3 live streams) I attempt the tiled model and explore a variety of solutions to the algorithm in JavaScript with p5.js. Also, check out WFC ...
First issue in Coding Train Suggestion box about WFC.
The original GitHub repository from mxgmn for the Wave Function Collapse algorithm.
Paul Merrell's 2009 PhD Thesis that is a predecessor to WFC.
Processing Forum post by solub with guide to Wave Function Collapse in Python.
Mozilla developer reference page for higher order array function: filter().
Garazbolg's GitHub issue describing a solution for asymmetric tiles.
Telemako's GitHub issue describing a solution for asymmetric tiles.
Mozilla developer reference page for the array reverse() function.
Code that mashes up sentence fragments from a given corpus to produce poems with fixed metric forms.
Created by Oskar Stålberg, 3D WFC system that creates cute little houses, arches, stairways, bridges and lush backyards.
A fork of Wave Function Collapse with tools for the Unity Game engine by @ExUtumno.
Playing with Wave Function Collapse by generating variations of Zelda maps.
Created by Oskar Stålberg in unity, an interactive demonstration of the WFC algorithm.
A game where you walk through an infinite city that is procedurally generated from a set of blocks with the Wave Function Collapse algorithm.
Tweet from exutumno generating scenes with full 3d local symmetry. Only 5 tiles used: Empty, Line, Turn, X, Stairs.
Wave Function Collapse Live Stream #1
Wave Function Collapse Live Stream #2
Wave Function Collapse Live Stream #3
3Blue1Brown video with more detailed context about entropy and information theory.
Coding Train video with explanation of tracking 2D grid in 1D array (for pixels).
Coding Train video covering JavaScript arrow (=>) function.
Coding Train video covering how to use higher order array functions like filter() and map() in JavaScript.
In this three part tutorial, I cover matrix "transformations" using p5.js.
Video about wave function collapse in procedural game creation
- Editing
by Mathieu Blanchette
- Animations
by Jason Heglund