More image generation, yay
Posted on 2017-01-20 23:28
So! I spent some more time working on my image generator algorithm based on/inspired by the Wave Function Collapse algorithm.
Here’s what I ended up with the last version of my first generator:
At that point it was really really slow even with very small input pics (you’ll notice that the output image is smaller to help; the gifs don’t represent the actual generation speeds!)
I decided to re-do the whole thing, this time trying to implement as much as possible in lua. In the end I got it working much, much faster:
I implemented some more things after taking that gif, but sadly didn’t make any new compilation gifs. I think this next one is done with a later version (tried to make an input that’d generate roguelike-like areas). Fairly sure I kept improving the algorithm after that, too!
Finally, I made some simple roguelike-like map generation using the final iteration of the algorithm! First with a more basic “tunnels, walls (and water for some reason)” pattern:
…And then with a more complicated pattern:
All in all I’m really happy with how this thing turned out, even though it’s not really a match for the WFC algorithm. I think this could be useful when generating levels, although I think it’d have to be comboed with multiple input images to really work. Maybe first an input image that defines various ‘areas’, then separate inputs for all those area types? I’d like to release the source of this but I think I’ll have to ask ExUtumno who made the WFC algorithm first, since my algorithm is very heavily inspired by it.
Tags: Games, Other, Plans, Procedural generation
Return