/wfc

Wave Function Collapse in C++20

Primary LanguageC++MIT LicenseMIT

wfc

Wave Function Collapse in C++20

This requires the C++ version pcg_random. Also, make sure you recurse submodules when cloning.

Example:

$ ./wfc -i mountain_range.txt -w 32 -h 32 -d 3 -o
^^  &...&           ^^^  &&&&&..
^^^ &...&   ^^     ^^^      &&&&
 ^^ &..&&   ^^   ^^^^           
 ^^ &..&&        ^^^    ^^      
    &..&         ^^^    ^^^     
    &..&    ^^^  ^^^^    ^^     
 ^^ &..&    ^^^    ^^    ^^^  ^^
^^^ &..&    ^^^           ^^  ^^
^^  &..&         &&&&&&         
    &..&  &&&&&&&&&..&&&&&&&&&&&
&&&&&..&&&&&....................
................................
...............&&&&&........&&&&
&&&&&&&&&&&&&&&&&  &&.......&   
    &&              &.......&   
           ^^^^     &......&& ^^
&       ^^^^^^^  ^^ &......&& ^^
&       ^^^^     ^^ &.......&   
&  &&               &.......&   
&&&&&&&&&&&&&&      &......&&   
........&&..&&&&&&&&&......&&   
...........................&    
&&&&&......................&    
    &...&&&&&&&............&    
    &..&&     &............&    
^   &..&      &............&  &&
^^  &..&   ^^ &............&&&&&
^^  &..& ^^^^ &..&&&&...........
    &..& ^^^  &..&  &...........
&&&&&..&      &..&  &..&&&&&&&&&
&&.....&      &..&  &..&       &
.......&      &..&  &..&  ^^