Orbit: mouse left click and drag.

Zoom: mouse wheel.

Space: generate a new level.

UI definitions

- Left/Right arrows: changes the type of modules.

Generate: generates a new level with the current stats.

Seed: a specific seed for the random state.

Random: will apply a random seed for the next generation.

Map size: x/y/z level dimensions

Divide: will apply multiple wfc dividing the whole level, for better optimization.

Process: Activate it to see the whole generation, step by step.

- Speed: the process speed.

- View module possibilities: the wfc algorithm starts with all possible modules for each cell in the level. The whiter the cell, the more modules it contains.

Backtracking: the generation may result into a cell impossible to collapse (it has 0 possibilites) and then it creates a red square. With backtracking, it will return to the last state, continuing the random generation from there.

You can find a simple implementation of the algorithm, (part of a Udemy course I'm creating) here: Currently it will be in my native language (catalan) let me know if you'd be interested in a course in English!

Rated 5.0 out of 5 stars
(4 total ratings)
AuthorGuillem Serra
TagsGenerator, Level Editor, Procedural Generation, PROCJAM, wavefunctioncollapse, wfc


Log in with to leave a comment.


M'ha sorprès veure un nom català al comprovar qui ha fet tal meravella!


Eiii moltíssimes gràcies!!