BorisTheBrave / DeBroglie

DeBroglie is a C# library implementing the Wave Function Collapse algorithm with support for additional non-local constraints, and other useful features.
https://boristhebrave.github.io/DeBroglie/
MIT License
471 stars 37 forks source link

Edge Types for Topologies #7

Open BorisTheBrave opened 6 years ago

BorisTheBrave commented 6 years ago

At the moment, all locations of a topology are identical. We need a feature where certain edges of a topology can be marked up in some way, and they behave differently with respect to propagation. There's two main cases for this.

1) Meshes If the edge between two cells could convey a notion of rotation then we could have topologies where each location is a face on a mesh.

2) Better mask handling This is kinda fiddly to explain, but at the moment, masks interact weirdly with the Overlapping model. In the precense of masked out locations, we could mark up nearby edges so that patterns propogate differently, specifically they no longer require that adjacent patterns agree on the value of a nearby tile, if that tile is masked.

justonia commented 6 years ago

For option 2, it's almost as if a masked tile is a wildcard right?

BorisTheBrave commented 6 years ago

I mean, all locations are wild in the sense that they are waiting to be filled in with any tile. The masked locations are wild, but further (when correctly implemented) can take a different value for every overlapping rect that covers them, so they truly don't constrain any thing. Right now, masked out tiles sometimes behave as if they have a value selected for them, and block anything nearby that is not consistent with that value.