Mapgen3 demo

 from Red Blob Games
Oct 2014

HTML5 sequel of mapgen2. Abandoned for a variety of reasons. See mapgen2 or mapgen4 instead. Live demo; click to generate a new one:

Bug: sometimes two rivers are parallel to each other and connect instead of staying separate:

Bug: sometimes rivers go through lakes:

Bug: sometimes it doesn’t work at all:

More details:

After the Flash version of mapgen2 (2010), I worked on this HTML5 version, which was going to be (a) switch from Flash to HTML5, (b) use new algorithms, (c) use new data structures. The combination of doing all three of these changes at once was too much. It was hard to figure out what was going wrong when everything had changed. As you can see above, there are weird bugs that I was never able to figure out. I abandoned this, and made smaller changes to make progress:

  1. (early 2017) I studied the new data structures on their own, in smaller projects first. My first blog post about this was here; and I later wrote a guide[1] to the data structures (2018).
  2. (mid 2017) I experimented with map generation algorithms[2] with separate small projects. I knew I had something promising but I wasn’t able to put it all together yet.
  3. (late 2017) I ported mapgen2 to HTML5 + new data structures. You can see the result here. Yes, this version of mapgen2 was written after mapgen3.
  4. (late 2017) I experimented with 3D rendering for mapgen2.
  5. (mid 2018) I started putting everything together[3]: new data structures, new algorithms, new 3D renderer.
  6. (late 2018) I released mapgen4.

I tried making all the changes at once, but failed. I broke it up into smaller experiments and changes, and that was successful.

Email me , or tweet @redblobgames, or comment: