View on GitHub

Libmapgen

C# library for procedural map generation (dead project)

Download this project as a .zip file Download this project as a tar.gz file

libmapgen

Edit: This project is dead. This website is left as an archive. See README.

C# library for procedural map generation

libmapgen is going to be a library that can be used to generate 2d tile-based maps procedurally, with ease. Using a series of passes, you can build a ruleset for generating a map by giving instructions like so:

Something like that. Unity game engine integration is also being worked at on Terrainstorm. Initial implementation will be in C#, afterwards porting to C++ if there's enough time. libmapgen is part of my final school project.

Usage

using libmapgen;

Ruleset ruleset = new Ruleset(new RandomGenerator(10, 10, 0.0f, 1.0f)); // add initial generator
ruleset.passes.Add(new FlattenPass()); // add 1 or more map passes
MapArea map = ruleset.generate(); // generate map
// use MapArea here

Status

Basic generator/passes system is currently working. These generators are currently working:

These passes are implemented:

Testing is currently badly done because I've been focusing more on functionality and I'll need to sit down to think about how I want it done a bit more. There's no guarantee of API stability at all, though the current structure seems like it could be a good one. I'll stabilize it some more when I have good results with this and Terrainstorm.

Contributing

The easiest way to contribute is to add a new IInitialGenerator or IMapPass.