A downloadable asset pack for Windows

Download NowName your own price

This is two separate assets, showing off pure GML implementations of Wave Function Collapse and a basic maze generation algorithm called Hunt And Kill.

Looking for some procgen for your game? Check these out, they're both basically just a script you can import into your game and run for yourself!

Since both algorithms are personal experiments with bugs and a low number of features, I'm releasing them for free, so expect less support than usual for these things. (I barely understand them in the first place...)

Wave Function Collapse

The algorithm was originally devised by Maxim Gumin and released under the MIT license:

https://github.com/mxgmn/WaveFunctionCollapse

However, this Game Maker implementation was created from scratch without access to the original source code for reference, only using similar ideas. It's legally distinct but I still think it would be immoral not to credit the original inventor.


WFC is a very recently invented algorithm that got popular since you can replicate any input data using it, letting you use the same generator for all the content in your game. 

The drawback is that it's very slow, and basically can't run in real-time (at least not my GML implementation). Also, the output isn't guaranteed to be a solvable dungeon.

If you plan on using WFC in your projects, you probably should get the original version from Github, I mostly did this as a personal experiment - and you could say it wasn't exactly successful. But if you absolutely need a GML version of WFC for something, you could use this abomination of a port if you're really desperate.

Hunt And Kill

The name of this algorithm supposedly comes from how it it guaranteed to cover all available options. (Of course, I even managed to screw that up in my implementation)

The gist of it is that you generate a maze, then do stuff with it to make it more dungeon-like.

My implementation uses random walks from unvisited cells, which is very likely but not guaranteed to create a single interconnected space.

Walk randomness can be configurable, too, between going straight until you hit a wall to changing directions every step.

The maze walk keeps going until a certain configurable density of the input area is covered in paths.

After this step, dead-end paths are removed recursively a configurable number of times, and rooms are placed in the most connected areas that remain.

This algorithm runs a lot faster than the WFC implementation. I'm sad I couldn't get it to avoid creating useless loops or a be guaranteed to create a single interconnected area, but at least it's fast.

StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorYal
TagsGameMaker, Procedural Generation, sourcecode

Download

Download NowName your own price

Click download now to get access to the following files:

Hunt And Kill: Demo 2 MB
Wave Function Collapse: Demo 2 MB
Hunt And Kill: Source Code (Game Maker Studio 2.3) 60 kB
Wave Function Collapse: Source Code (Game Maker Studio 2.3)
EULA 22 kB

Comments

Log in with itch.io to leave a comment.

(+1)

Very nice! I was actually toying with a wave function collapse algorithm for procgen in GM recently! This looks great! Good work!

(+1)

Thank you! ^__^

I was wondering would you be willing to do custom orders

I'm not - I'm simply too busy to do commissions.

Ok, thank you for replying

(1 edit)

I'm atleast thinking about getting the maria engine 64 to hopefully be able to modify it into a megaman legends/ megaman x type engine, could you please do a tutorial on such a conversion

(+1)

Dude, you are awesome! Thanks for these! 

Thanks! I hope they're useful for something! ^__^