Skip to content

Ideefixze/WaveFunctionCollapse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

WaveFunctionCollapse

Procedural generation with constraints based on Wave Function Collapse algorithm.

1D

For an input string generates string of similar structure, respecting all constrains in an input string.

INPUT: "AAXBBX", N=2, cellnum=8:
OUTPUT: "XAAAXBXBXBBBXAAA"

INPUT: "DOG", N=3, cellnum=5
OUTPUT: "OGDOGDOGDOGDOGD"

2D

For an input:

here is an output:

Remember:

  • Not all inputs are viable
  • Input should be small and simple
  • Big input will add a lot of constraints and it may take ages to complete
  • Often it does have a "deadlock" meaning it is unsolvable, script will end without an output

About

Procedural generation with constraints.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published