Collapse
Generate Procedural Worlds With Wave-Function Collapse
Collapse Settings
Collapse Inverval (ms)
Collapse Leniency
Display Settings
World Settings
World Width
World Height
Wave-function collapse is a procedural generation technique very loosely inspired by wave-function collapse in quantum mechanics.
Imagine that we have grass tiles, sand tiles, and water tiles.
Let the constraints be as follows:
Grass can only be adjacent to coast.
Sand can be adjacent to both grass and water.
Water can only be adjacent to sand.
In the beginning, every tile can be anything. Force a tile to collapse to select a possibility at random. This reduces the possible adjacent tiles. Repeat this until all tiles are filled.
Created with help from: https://robertheaton.com/2018/12/17/wavefunction-collapse-algorithm/ and https://www.boristhebrave.com/2020/04/13/wave-function-collapse-explained/