Archive for the ‘Procedural generation’ Category.

Markov things

I put parts of Lord of the Rings script and recipes into the generator:
frodo
frodo2
frodo3
frodo4
frodo5
frodo6
(Some of the later ones use only the script and no recipes because I accidentally overwrote the recipes that best fit with the script + the results weren’t that interesting.)

Weekly progress post #76: Recipes

Today’s stream was kind of a silly one; I spent most of it working on a markov chain recipe generator. I had made the generator itself last spring, but the recipes I used then were written by random people and thus had fairly different ways to express themselves, making the generation less interesting. On top of that I was a bit uncomfortable with showing the generator off with the data being recipes ripped from the internet. Today I went and dug up an old Chinese cookbook I have and started adding recipes from that instead; the book is from 1984 and old enough that tofu wasn’t a common thing in the west yet (it’s referred to as “bean cheese”). Since the book is in Finnish, I had to translate it on the fly which probably butchered a lot of the grammar, but at least now I have something I can actually show off! As can be seen in the gif above, there’s a lot of repetition (I think I have 7 or 8 recipes in the database atm); I suspect there might be a bug in the algorithm itself because there are large parts of recipes that basically never show up in the generated ones. Gotta look at that! Fun projects.

Baba was also worked on; I implemented a level selection dialogue for when a level has a more difficult variant available. This has been on my to-do list for a long time now but various things (laziness, The International 2017) have reduced my motivation to actually get it done. The way the variants themselves are implement is terrible right now so that’ll need some looking at. As a nice side effect of this work, I separated the names of the levels into a separate file because previously they had been stored in a very nonsensical way that is somewhat hard to explain. Progress!

Map generator (open-source!)

Well, that sure took a long time! I’ve promised to release a tutorial of how my map generation works multiple times over the years; for various reasons I haven’t managed to fulfill that promise until now. But better late than never, eh?? EH???

I kinda want to add a tutorial for generating towns as well, plus adding names for the different biomes. On top of that, road generation & area-of-influence generation are the two big things missing; the former is basically just A* so it’s not super interesting, but the latter might be a cool thing to add as well. We’ll see! No promises.

GET THE GENERATOR HERE!

 

The generator is fully MMF2-made, but should run on Clickteam Fusion 2.5, assuming that you have the plugins required. There’s a nice little executable included, so not owning MMF2/CF2.5 doesn’t prevent you from toying around with the generator!

The plugins required are:
– ‘Surface’ by Looki: http://lukasmeller.com/mmf/extensions/beta/Surface1.5.zip
– ‘MT Random object’ by Chris Branch: http://www.clickteam.com/webftp/files/mmf2/Exts/MMF2ExtPack1.exe

I’m not sure how the MMF2 Extension Packs work these days since the program itself has been discontinued; if you can’t install it, tell me and I’ll try to resolve the issue (or contact Clickteam).

Image Generation Algorithm

Well then!!

I decided to release the image generation algorithm I’ve been working on. I feel that I went kinda overboard with the legal license stuff but it seems that those are the norm, so hopefully everything is okay there. Please tell me if not! The zip contains an executable, the source file, lua files for the algorithm and a variant with wrapping enabled as well as a readme file.
 
Again, this algorithm is heavily based on the WaveFunctionCollapse algorithm by mxgmn.
 
To open the source file, you’ll need two MMF2 extensions:
Surface by Looki
Xlua by Justin Aquadro

GET THE ALGORITHM HERE

wfc9

Procedural generation is dear to me.

After that previous post I decided to finally add a ‘Procedural generation’ tag for my blog, and went through all the posts to tag them if applicable (with games like Excavatorrr I mostly tagged posts with pics!)

It made me very happy to realize that my blog has essentially begun with a procgen project (Excavatorrr) and continued to feature said thing frequently through the years. If I look at the stuff I’ve made, a nice amount of my games incorporate procedural generation in some form (Masjin, CWOUN, Excavatorrr, Paradise Fort, World Generator off the top of my head), and this recent interest in things like theĀ WFC algorithm and Markov chains provide evidence that my interest in procgen hasn’t really waned. Quite the opposite, I guess!

So yeah. Thanks, procedural generation. U the best.

More image generation, yay

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:
wfc4
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:
wfc5
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!
wfc6

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:
wfc7

…And then with a more complicated pattern:
wfc8

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.

Procedural generation, yay!!! Also Ludum Dare results

After seeing the developer of Caves of Qud utilize the Wave-function collapse generation algorithm successfully for generating roguelike environments, I felt like it’d be fun to try to implement something akin to that in Multimedia Fusion 2. The original algorithm (You can find it here!) was written in C# and after trying to parse the code for a while I gave up and thought up how to approach the algorithm based on the general description of it on the git repository. The result isn’t nearly as nice and tidy, but it was fun to dabble with and it just might be useful for something if I can get it optimized a bit.

First try:
wfc

After some tweaks:
wfc2

Current state:
wfc3

As you can see, the algorithm suffers from slight misalignments here and there, making the results less neat, as well as small holes that are technically ‘handled’ by the algorithm but for one reason or another don’t get assigned anything. The generation is also very slow, something that can’t be seen in the gifs.

Anyway!! Ludum Dare #37 results arrived! Sadly, Salvage Star didn’t fare very well – it got in the top50 in the Graphics category, but that’s it. Very much understandable since the game ended up being really hard and frustrating + I guess people have kind of seen the ‘singular huge enemy you climb’ -thing already at this point. Still, I of course kinda wish it had fared better! Maybe next time. At least the game gave me some good data on how to get moving platforms to play nice.

Download Salvage Star

 

salvage5

Screensaver jam!

So, over the weekend there was a little jam organized by JW with the theme of making screensavers. I was really really busy on Saturday and most of Sunday, but I managed to complete a little thing nonetheless:

Island Screensaver!!

CWOUN 100% completion recorded by Kie!

Here’s a really cool video of Kie beating the game fully:

Really cool! Thanks a lot for linking this :) I’ll try to get back to updating the game some more eventually but alas, life is hard and things take up time.

Excavatorrr reviewed by IndieImpression!

Now this was sweet, Nick Reineke at IndieImpression made a really cool video showcasing the game, also saying that he might stream it in the future. Thanks, Nick! And thanks, those of you who read this blog, too :)

There are a bunch of things to be fixed in the game, but I decided to release a small patch that fixes at least something; I made it so that there’s a new option to disable submitting scores altogether, and made it so that the game is able to automatically enter the last nickname the player has used. Handy!

Get the new version here!

 

Aaand here’s the video review. Good stuff!