Page 1 of 2

Markeen: probabilistic random Galaxy level generator

Posted: Tue Aug 23, 2016 22:24
by Fleexy
I mentioned that a while back, I tinkered with the idea of statistically creating Keen Galaxy levels. The result was Markeen.

It's not done by any stretch of the imagination, but it is kind of neat, so I figured I'd show my progress. It can create levels that are pretty messy, but usually show the structure of a sane level design. Only the foreground is processed, so the background and infoplane is up to you! If you use the levels as a starting point, make sure you check the tileinfo - it doesn't know anything about reasonable platform structure, only tile arrangements (which usually take you most of the way).

Download Markeen (alpha 8/23/2016)

[EDIT: For a new version, see the second page.]

It works by first creating a profile - the statistics on which tiles appear next to which other tiles - from provided levels then generating new levels from that profile. All operation is done on the command line. Place the EXE in a folder with FleexCore2 (FMod.dll). To create a profile, use the "profile" argument followed by the output filename, the profiling depth (I use 5), the source GAMEMAPS, the source MAPHEAD, and optionally the source MAPDICT. To generate new levels, use the "generate" argument followed by the profile filename, the number of levels to create, the output GAMEMAPS, and the output MAPHEAD. You can then open those output files in your level editor (Abiathar recommended, it comes with FMod.dll).

Happy leveling!

Posted: Tue Aug 23, 2016 23:36
by Nisaba
Oh that's sweet.
I've followed your blog over there for quite some time, where you posted some development notes. I was and still am pretty exited which direction this thing might take. gonna give this a shot soon. This randomized level output might be a good starting point for getting some inspirations on how to design a future galaxy mod...

Posted: Wed Aug 24, 2016 9:34
by Levellass
Wow.

Ok, there was one level it made that used part of the tileset right. The rest... Ooog.

Image


I'm guessing as the tileset is rather complex (Apart from the grey tiles) it has some trouble building a coherent profile. Will have to poke around and see just what's going on here.

Posted: Wed Aug 24, 2016 13:18
by Fleexy
It does tend to have problems with very complex tilesets. I find that it works pretty well on the original Galaxy episodes (Dreams not so much) and Ceilick's Keen 7 and Keen 8. The profiling depth matters a lot; you'll get much better levels with a depth of 5 than with a depth of 1, though the generator isn't tested with very deep profiles, so you might get very boring levels (and massive profile files) if you go up to 12 or so. Also note that the profiler always ignores level 0 (to avoid contaminating levels with world map tiles). If your world map is a different level, you might want to delete it before feeding the maps into Markeen.

Posted: Wed Aug 24, 2016 15:42
by Gridlock
Interesting. I haven't had time to play around with it yet, but I'm very curious what output for Keen 5 might look like. I suppose it'd be kind of fun to include a randomly generated level in The Alphamatic (with major tweaks of course), but I'm not sure how well it would work.

I hope you keep playing around with this. Random generation can't replace a real level designer, but it could certainly be a useful tool.

Posted: Wed Aug 24, 2016 16:11
by Keening_Product
We all know where this is heading: an open-world, procedurally generated Keen game. No Man's Sky didn't say anything about right year old kids ruling the galaxy.

This tool is neat, by the way.

Posted: Wed Aug 24, 2016 16:29
by Roobar
Cool! Post more screenshots please!

Posted: Thu Aug 25, 2016 1:57
by Fleexy
Certainly! Here's an Imgur album of some. I also just published some more development notes.
Gridlock wrote:I suppose it'd be kind of fun to include a randomly generated level in The Alphamatic (with major tweaks of course), but I'm not sure how well it would work.

I hope you keep playing around with this. Random generation can't replace a real level designer, but it could certainly be a useful tool.
Heh, it would be pretty cool to see a Markeen-based level in a real production! It would indeed require a good deal of tweaking, considering the messes it tends to make in these early versions. (There's probably an idea for a leveling competition in here somewhere.) As for using Markeen as a level-building tool, that's a great idea. I did a test in which I blanked out some of a default level with the placeholder and ran Markeen on it. It successfully put in something reasonable in several cases. Along with the profile editing tools I added today (which could be GUI-ified in the Abiathar extension), this could conceivably become an intelligent leveling aid that's able to learn from its mistakes. Cyborg level design for the win?

Posted: Thu Aug 25, 2016 6:45
by Nisaba
Fleexy wrote: it would be pretty cool to see a Markeen-based level in a real production! It would indeed require a good deal of tweaking, considering the messes it tends to make in these early versions. (There's probably an idea for a leveling competition in here somewhere.)
yauz, that sounds like fun. what about a community Levelpack based on the output of your tool (call it The Reconstruction of MarKeen). every competitor could receive one random map with the task to showcase her/his creativity and the ability to deal with this sort of haphazardness.

the output could be complexity hilarious and crazy but there is a good chance of having a neat PCKF project.

Posted: Thu Aug 25, 2016 7:04
by Levellass
It's agreed then, I shall nag at LL to allow a Markeen level. You say the profile depth goes up to 12? Interesting. I found that deleting incomplete levels has helped the level design a bit.

Posted: Fri Aug 26, 2016 0:35
by Fleexy
There isn't actually a hard-and-fast limit on the profile depth, but you'll get horrible slowness and massive files as you increase it. Once I determine a better tile scoring algorithm, deeper profiles would always create better levels. Today, I made the profiler a little smarter - it now chops up the levels into their visible regions (divided by the bars in the infoplane) before profiling. Here are more pictures and here's a new blog article.

Would people be interested in a Markeen-based level design competition? I'd like to get it performing a little better in terms of quality before releasing another version, but I'll try to gauge interest now. (The seed feature was developed exactly for this possibility.)

Posted: Fri Aug 26, 2016 11:01
by Levellass
Could be interesting, if I can find the time.

What's with all the pink tiles?

Posted: Fri Aug 26, 2016 13:08
by Fleexy
When Markeen finds a spot where it can't place any tile (because nothing is compatible with all of the immediately adjacent already-placed tiles), it places FA17h ("fail"), which is far beyond the end of the tileset. Abiathar renders unknown foreground tiles as hex with a pink background, kind of like how unknown infoplane values are in white and unknown background values are in yellow. Other editors may render them differently, not render them at all, or crash altogether.

If I can implement a smarter fill order, these contradictions/failures should be dramatically reduced.

Posted: Sat Aug 27, 2016 23:26
by Ceilick
This is pretty cool! I could definitely see creating some levels with the loose templates that Markeen creates. From what little I've seen, it's particularly useful for a cave, building, or any other interior location. I actually really like the point placement too; sometimes it's hard to place point items in a way that doesn't feel organized or symmetrical in some way.

Posted: Tue Sep 27, 2016 15:33
by KeenRush
Very fascinating! I've wanted to see something like this. Haven't tried it but went through all the blog posts; it's scary how alien some levels look, and also how almost-playable some are. Definitely an interesting tool in a leveller's arsenal.

By the way, would be neat to see how it'd do with Keen 3. Would it make better and less buggy levels than the official ones? :D