Experimental map generator for Minetest, implementing river networks, lakes, and erosion.
Go to file
Gaël de Sailly b429b302e1 Rewritten part of code to calculate river depth
Fixes bathymetry problems on turns or confluences, as well as abrupt riverbanks.
2020-04-26 22:19:05 +02:00
.gitignore Switch again to using river direction and flux instead of table of bounds 2020-04-26 18:10:23 +02:00
bounds.py Comment and clarify 2020-04-26 17:13:38 +02:00
erosion.py Comment and clarify 2020-04-26 17:13:38 +02:00
geometry.lua Comment and clarify 2020-04-26 17:13:38 +02:00
init.lua Rewritten part of code to calculate river depth 2020-04-26 22:19:05 +02:00
load.lua Re-organized the code. All polygon-related calculations go to polygons.lua. 2020-04-14 21:11:54 +02:00
polygons.lua Rewritten part of code to calculate river depth 2020-04-26 22:19:05 +02:00
README.md terrain_rivers.py: mapsize is now the number of intervals 2020-04-26 19:51:21 +02:00
rivermapper.py Comment and clarify 2020-04-26 17:13:38 +02:00
save.py Compress data files (reduces size by a factor 3-4) 2020-04-13 15:59:34 +02:00
settings.lua Re-organized the code. All polygon-related calculations go to polygons.lua. 2020-04-14 21:11:54 +02:00
terrain_rivers.py terrain_rivers.py: mapsize is now the number of intervals 2020-04-26 19:51:21 +02:00
view_map.py Enhanced visualization code to display colormaps, and reuse the same code for initial and further viewing, in view_map.py 2020-04-26 18:30:29 +02:00

mapgen_rivers

Procedural map generator for Minetest 5.x. Focused on river networks, and features valley erosion and lakes.

Contains two distinct programs: Python scripts for pre-processing, and Lua scripts to generate the map on Minetest.

Screenshot

Installation

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

The Python part relies on external libraries that you need to install:

  • numpy and scipy, widely used libraries for numerical calculations
  • noise, doing Perlin/Simplex noises
  • optionally, matplotlib (for map preview)

They are commonly found on pip or conda Python distributions.

Usage

Pre-processing

Run the script terrain_rivers.py via command line. You can optionally append the map size (by default 400). Example for a 1000x1000 map:

./terrain_rivers.py 1000

For a default 400x400 map, it should take between 1 and 2 minutes. It will generate 5 files directly in the mod folder, containing the map data.

Map generation

Just create a Minetest world with singlenode mapgen, enable this mod and start the world. The data files are immediately copied in the world folder so you can re-generate them afterwards, it won't affect the old worlds.