Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Pretty cool. Couldn't you just generalize the WFC algorithm to elements larger than 1 pixel? Or is that basically what you're doing?

(+1)

I am doing something similar, at least on the surface, though it's very different from how WFC is usually implemented. 

WFC's tile-based mode can't analyze textures by itself and needs JSON to know the rules between everything. However, its pixel-based mode can analyze textures but only places pixels in overlapping patterns it recognizes, with no regard for distance or adjacency. Even if you stretch the pixel-based mode to be larger, it'll still have some strange results. 

Sibyl's algorithm was initially inspired by the tile-based approach. But it scans and recognizes tiles in order to automatically create its own rules for each them. In practice, this requires a lot of different changes to how the algorithm even works, to the point where it's become it's own thing. The closest thing I've found to Sibyl's algorithm is something called a Markov Chain-based Wave Function Collapse, but that works very differently on the inside, and it still requires some manual JSON.

The largest difference between MkWFC and Sibyl is that Sibyl also considers probability, based on the template it's provided. So instead of simply placing compatible tiles, it places them according to the frequency in which your template uses them. So if your template has a ton of grass, a moderate amount of water, and a flower that only sometimes appears - Sibyl's outputs will tend to have similar results. This allows it to create levels that feel handcrafted, because it actually studies how the templates you provide are crafted.

(+1)

OK, yeah I think I understand now. Thanks!

I would think putting "Markov Chain" in the name implies some amount of probability, but maybe that's why I'm not in charge of naming things.

(+1)

At least to my understanding, the Markov Chain variant uses randomness (like regular WFC) but it doesn't use weighted decisions. So it asks "what could go here" while Sibyl asks "what would best fit here". 

All that said, WFC and MkWFC are still very good algorithms. Most importantly, they're naturally faster, so they can be used in games for real-time generation, while Sibyl sacrifices some speed for control and quality. I am still working to optimize Sibyl, but it does have a higher workload to contend with.