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:
![](parallel-rivers.png?2017-06-03-20-20-57)
Bug: sometimes rivers go through lakes:
![](river-through-lake.png?2017-06-03-20-20-29)
Bug: sometimes it doesn’t work at all:
![](fail.png?2017-06-03-20-21-06)
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:
- (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).
- (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.
- (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.
- (late 2017) I experimented with 3D rendering for mapgen2.
- (mid 2018) I started putting everything together[3]: new data structures, new algorithms, new 3D renderer.
- (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.