Base Version Finished
Patching is here! Now the program is feature complete!
Before getting into the patching, I added an additional parameter of entropy by accounting for the amount of adjacent tiles that have been defined. At first I tried to have the entropy uncapped, but it resulted in this strange square generation behavior which produced results that were almost always highly correlated on diagonals. I did not want that at all, so I made it that it only differentiates between tiles that are surrounded and tiles that aren't. This doesn't really change generation behavior much other than filling in small holes when they form, which I was always annoyed by when they were left untouched.
I also changed the weights of the constraint graph that dictates the probability of moving from one color to another. The end result is now that gray really wants to move to a weak color, and all colors gravitate towards weak colors. This tweaking made it so I could allow high value colors to be adjacent to each other again, and now provides a kind of map that I was looking for. Sometimes a single color comes to dominate still, but I'm ok with that happening as long as it's not practically guaranteed.
For patching, I took in a random invalid tile, the ones that don't have any color they're allowed to be, and looked for its neighbor with the highest strength to wipe. I went for ones with high strength, as those are the ones that usually have the most limiting constraints. I then try to assign the tile a new color. If I can't assign it a color, I wipe another neighbor. If no more neighbors can be wiped, this happens when the remaining neighbors are also invalid, I move on to another tile. This keeps happening until every tile is covered. It's fun to watch them dance around if you get a large amount of invalid tiles.
I'm finished with the base program for now except for bug hunting. Next up is to make a web based version that can be played on this page.
Files
Get Toy Wave Function Collapse with Patching
Toy Wave Function Collapse with Patching
Status | Released |
Author | Apple Boom |
Genre | Educational |
More posts
- FixesMay 12, 2021
- Added Wave Function CollapseMay 11, 2021
Leave a comment
Log in with itch.io to leave a comment.