I found this twitter bot https://twitter.com/unchartedatlas posting maps that look like they came from a pulp fantasy novel.
Any idea on how they are done?
Worldbuilding Stack Exchange is a question and answer site for writers/artists using science, geography and culture to construct imaginary worlds and settings. It only takes a minute to sign up.Sign up to join this community
Fortunately the author, Martin O'Leary, has posted rather detailed walkthrough of the algorithm of how the maps are generated here: http://mewo2.com/notes/terrain/ as well as how the names were created here: http://mewo2.com/notes/naming-language/.
A brief summary of the algorithm covered by Martin O'Leary’s post:
Grid: Create a height map with a grid of random points. Random points doesn’t look naturalistic so apply an iteration of Lloyd’s algorithm to the corners of the Voronoi polygons.
Rough Outline: Apply a set of sequence of primitives (constant slope, cones, blobs) and operations (normalize, round hills, average local height, set sea level) can be varied to produce different kinds of landscape, such as coastlines, islands and mountain ranges.
Erosion: Apply a constant flow of water over the entire map and use Planchon-Darboux algorithm to fill in the depressions. Calculate water flux to get rivers.
Render terrain: Coastline is where the height map crosses zero. Rivers based on the water flux and some smoothing of the points. Apply shading to slope.
Cities and borders: Place city near river and penalize nearness to other cities and to edge of map. Mark out region based on distance, slope, water flux, and shorelines.
This is a rough summary of Martin O'Leary's post. I really recommend reading the post as the author does go into detail about the programmatic terrain generation and the post itself has interactive elements.
Similarly the author the post on the linguistic aspect of how the place names were generated also has interactive elements.
The terrain map project is open sourced on github here: https://github.com/mewo2/terrain
The naming project is open sourced on github here:
The creator's website is pretty well documented on how they did it.