||1 week ago|
|terrainlib_lua||3 weeks ago|
|.gitignore||1 year ago|
|CHANGELOG.md||3 weeks ago|
|LICENSE||1 year ago|
|README.md||1 week ago|
|compatibility.lua||6 months ago|
|environment.yml||6 months ago|
|geometry.lua||3 weeks ago|
|heightmap.lua||4 weeks ago|
|init.lua||1 week ago|
|load.lua||3 weeks ago|
|mod.conf||1 week ago|
|noises.lua||3 weeks ago|
|polygons.lua||3 weeks ago|
|pregenerate.lua||3 weeks ago|
|readconfig.py||6 months ago|
|settings.lua||3 weeks ago|
|settingtypes.txt||4 weeks ago|
|view.py||6 months ago|
|view_map.py||6 months ago|
Map Generator with Rivers
mapgen_rivers v1.0.2 by Gaël de Sailly.
Semi-procedural map generator for Minetest 5.x. It aims to create realistic and nice-looking landscapes for the game, focused on river networks. It is based on algorithms modelling water flow and river erosion at a broad scale, similar to some used by researchers in Earth Sciences. It is taking some inspiration from Fastscape.
Its main particularity compared to conventional Minetest mapgens is that rivers that flow strictly downhill, and combine together to form wider rivers, until they reach the sea. Another notable feature is the possibility of large lakes above sea level.
It used to be composed of a Python script doing pre-generation, and a Lua mod reading the pre-generation output and generating the map. The code has been rewritten in full Lua for version 1.0 (July 2021), and is now usable out-of-the-box as any other Minetest mod.
Author and license
License: GNU LGPLv3.0
Code: Gaël de Sailly
Flow routing algorithm concept (in
terrainlib/rivermapper.lua): Cordonnier, G., Bovy, B., & Braun, J. (2019). A versatile, linear complexity algorithm for flow routing in topographies with depressions. Earth Surface Dynamics, 7(2), 549-562.
No required dependency, but
biomegen recommended (provides biome system).
This mod should be placed in the
mods/ directory of Minetest like any other mod.
It is recommended to use it only in new worlds, with
singlenode mapgen. On first start, it runs pre-generation to produce a grid, from which the map will be generated. This usually takes a few seconds, but depending on custom settings this can grow considerably longer.
By default, it only generates a 15k x 15k map, centered around the origin. To obtain a bigger map, you can increase grid size and/or block size in settings, but this can be more ressource-intensive (as the map has to be loaded in full at pre-generation).
Settings can be found in Minetest in the
All settings ->
Most settings are world-specific and a copy is made in
mapgen_rivers.conf in the world folder, during world first use, which means that further modification of global settings will not alter existing worlds.
The Python script
view_map.py can display the full map. You need to have Python 3 installed, as well as the libraries
matplotlib, and optionally
conda users, an
environment.yml file is provided.
It can be run from command line by passing the world folder. Example: