Skip to content

webcyou-org/wave-function-collapse-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple wave function collapse with tile model

This sample demonstrates a simple WaveFunctionCollapse Creating a tile model using rust and sdl.

Usage

cargo run

This is a simple implementation of the WaveFunctionCollapse tile model.

Tile data is specified in JSON.

Specifies the tile data image path, the sockets that can be combined, and whether they need to be rotated.

{
  "src": "castle/bridge.png",
  "edges": ["ACA", "ABA", "ACA", "ABA"],
  "isRotate": true
}

Tilemap generation screenshot

simple

castle

circles

circuit

floor_plan

knots

rooms

summer

Author

Daisuke Takayama