Terrainstorm: map generator (starting work this week, looking for suggestions)

Hey,

In the coming months I’m gonna start work on a sort of library for world map generation that integrates with Unity. It’s more for 2d games(stuff like adventure and strategy games), but you could use it with 3d games if you do some programming work afterwards. I’m primarily looking for interest and suggestions right now.

It’s really going to be 2 products. libmapgen is gonna be the backend:

And terrainstorm is going to be the name for the Unity integration. I’ll make a custom UI for it to make it easy to use on Unity.

I’ve made some beautiful programmer art of how it could work in Unity:

As you can see I’m not an artist. Anyway, here you can see a possibility of how it could work. You’d make your own tiles, add a few zones like desert or evil which have their own tile types, and use a heightmap algorithm to choose tiles. In this example, the lowest 30% of heights would become water tiles, between 30% and 70% grass, etc. Further, it’d be possible to add your own multi-tile structures(maybe for towns, dungeons, or forests), and roads(pathfinding between towns?) and rivers(flowing from high to low). You could use this to generate maps either in the editor, or at runtime.

What I’m looking for is to find out whether people would be interested in something like this. Would you use a Unity plugin for procedural map generation if it were freely available?

Also, are any of you working on procedural map generation in your own projects right now?

Finally, most importantly, I’d like your feedback on how this could work. In my picture I have a simple system, but I was also thinking of doing it like the optimization passes in LLVM, where you create a pipeline for generating your map like I have shown in Libmapgen
You could change your pipeline to add new passes(like adding a pass to generate monsters), remove passes(like taking away towns), change the order of passes(add trees after adding towns), and edit passes(like making roads go to your own structures, not just towns), to give maximum flexibility.

So now I need your input. What would you want to see in my procedural map generation plugin/library?

Sounds interesting. Probably a small example using the system running with the Unity webplayer in the browser would let everyone have a much clearer picture of how this can help them. Kudos for focusing on the actual project instead of obsessing over the graphics and never revealing your work.

Yeah, I’m going to start working on it this week, so I hope I’ll have a bit more to show in a next post. Thanks for the reply!

I’ve been continuing to work on this recently.

Here’s something simple you can generate with it right now:

Of course that’s not very special. What’s more special is the system I have that will make it easy to make very customized map generation scripts. It allows you to create a recipe likes this:

You’ll be able to add, remove, re-order and customize these passes from the UI(already working mostly), and if you can program you can add new passes which can be put into the UI.

The way forward is to add a lot of useful map passes and generators so that you’ll have a lot of useful things to generate maps with. Undoubtedly when getting to more complicated passes useful I’ll have to change the structure of the library. I still need to think about doing those.

Current code:
https://github.com/tmsbrg/Terrainstorm

libmapgen (not Unity-specific):
https://github.com/tmsbrg/libmapgen

I’ll make another update when I have some more interesting passes going. Maybe then I can show some more interesting maps too(I’ll have to create a more interesting mesh generator too, though).