Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wave Function Collapse
#3
(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.
Reply


Messages In This Thread
Wave Function Collapse - by dbox - 06-24-2024, 07:57 PM
RE: Wave Function Collapse - by justsomeguy - 06-24-2024, 08:30 PM
RE: Wave Function Collapse - by dbox - 06-24-2024, 09:34 PM
RE: Wave Function Collapse - by bplus - 06-25-2024, 02:37 AM
RE: Wave Function Collapse - by KingLeonidas - 06-25-2024, 03:35 AM
RE: Wave Function Collapse - by Pete - 06-25-2024, 03:37 AM
RE: Wave Function Collapse - by dbox - 06-25-2024, 03:30 PM
RE: Wave Function Collapse - by bplus - 07-08-2024, 11:25 PM
RE: Wave Function Collapse - by dbox - 07-09-2024, 01:18 AM
RE: Wave Function Collapse - by bplus - 07-09-2024, 12:50 PM
RE: Wave Function Collapse - by dbox - 07-09-2024, 04:23 PM



Users browsing this thread: 6 Guest(s)