06-24-2024, 09:34 PM
(06-24-2024, 08:30 PM)justsomeguy Wrote: Amazing work. I want to implement my own version of WFC in my rouge-like. Are the adjacency rules auto generated or predefined?Thanks @justsomeguy!
The adjacency rules are generated from a map that I created manually. So, I load that map first, find all the unique tiles and then walk through each x,y position on the map and create the adjacency rules based on what I find. This is done in the AnalyzeMap sub.
The nice thing about this approach is that you can use the same algorithm for any tileset just by creating a sample map with an editor. Coding the adjacency rules manually would be pretty painstaking unless you had a very simplistic tileset.