Log In  
Follow
Silenteddie
SHOW MORE

Cart #wfcroads-0 | 2024-02-07 | Code ▽ | Embed ▽ | No License
3

A test with wave function collapse with road tiles.
tried a different approach than backtracking, to ensure no contradictions:
after every collapse, the options of the neighbouring tiles are checked for updates. If they are updated then their neigbours are checked as well. (If the tile set is very "interconnected", this does not trigger wave through the entire board.) If there are no more cells to check and non reported it would have zero options, a commit of the collapse and updates is done. If not, a rollback is done and the chosen tile is removed from the options of the cell.

P#141270 2024-02-07 22:24

Follow Lexaloffle:          
Generated 2024-02-22 18:31:00 | 0.088s | Q:9