Experimental map generator for Minetest, implementing river networks, lakes, and erosion.
Go to file
2021-09-07 11:59:33 +02:00
terrainlib_lua Added reference to scientific paper 2021-07-28 19:50:27 +02:00
.gitignore Generate data in river_data instead of data 2020-11-14 19:12:12 +01:00
compatibility.lua Code style consistency: use tabs for indentation in all Lua code 2021-07-24 18:55:13 +02:00
environment.yml Updated README.md and added environment.yml 2021-07-24 18:49:17 +02:00
geometry.lua Comment and clarify 2020-04-26 17:13:38 +02:00
heightmap.lua New settings system, use a conf file instead of datastorage 2021-06-06 13:25:43 +02:00
init.lua Switch to singlenode mapgen if not done 2021-09-07 11:59:33 +02:00
LICENSE Add license, update/improve documentation 2020-11-15 11:43:30 +01:00
load.lua Code style consistency: use tabs for indentation in all Lua code 2021-07-24 18:55:13 +02:00
mod.conf Added support for biomegen mod 2020-11-14 17:35:03 +01:00
noises.lua Some changes in default settings 2021-07-24 10:23:06 +02:00
polygons.lua Added logs during pre-generation 2021-07-25 10:14:15 +02:00
pregenerate.lua Collect garbage during pre-generation to free some space and reduce OOM problems 2021-07-26 22:28:45 +02:00
readconfig.py Python map viewing: read conf file, and take world folder as input 2021-07-24 17:21:21 +02:00
README.md Updated screenshot 2021-08-01 18:43:44 +02:00
settings.lua Code style consistency: use tabs for indentation in all Lua code 2021-07-24 18:55:13 +02:00
settingtypes.txt Make map size a setting 2021-07-24 17:41:17 +02:00
view_map.py Python map viewing: read conf file, and take world folder as input 2021-07-24 17:21:21 +02:00
view.py Python map viewing: read conf file, and take world folder as input 2021-07-24 17:21:21 +02:00

Map Generator with Rivers

mapgen_rivers v1.0 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.

Screenshot

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.

Requirements

Mod dependencies: default required, and biomegen optional (provides biome system).

Installation

This mod should be placed in the mods/ directory of Minetest like any other mod.

Usage

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

Settings can be found in Minetest in the Settings tab, All settings -> Mods -> mapgen_rivers.

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.

Map preview

The Python script view_map.py can display the full map. You need to have Python 3 installed, as well as the libraries numpy, matplotlib, and optionally colorcet. For conda users, an environment.yml file is provided.

It can be run from command line by passing the world folder. Example:

./view_map.py ~/.minetest/worlds/test_mg_rivers