Experimental map generator for Minetest, implementing river networks, lakes, and erosion.
Go to file
Gael-de-Sailly 4772cddf39 Added screenshot in README 2020-04-12 18:17:57 +02:00
.gitignore Implemented grid twisting. Still many possible bugs, potentially clumsy implementation, but it seems to work. 2020-04-12 09:40:10 +02:00
README.md Added screenshot in README 2020-04-12 18:17:57 +02:00
bounds.py Added bounds.py: twists the grid as if the rivers were elastic bounds. Unused for now. 2020-04-11 14:29:39 +02:00
erosion.py Implemented isostatic rebound: loss of weight due to erosion will compensate at regional scale 2020-04-10 19:37:27 +02:00
geometry.lua More robust and faster code for grid twisting on the Lua side. 2020-04-12 16:42:03 +02:00
init.lua More robust and faster code for grid twisting on the Lua side. 2020-04-12 16:42:03 +02:00
load.lua Initial commit: working example using a basis of Simplex noise and implementing river flowing, lakes, and erosion 2020-04-09 21:15:41 +02:00
rivermapper.py Implemented grid twisting. Still many possible bugs, potentially clumsy implementation, but it seems to work. 2020-04-12 09:40:10 +02:00
save.py Initial commit: working example using a basis of Simplex noise and implementing river flowing, lakes, and erosion 2020-04-09 21:15:41 +02:00
terrain_rivers.py Implemented grid twisting. Still many possible bugs, potentially clumsy implementation, but it seems to work. 2020-04-12 09:40:10 +02:00

README.md

mapgen_rivers

Procedural map generator for Minetest 5.x. Still experimental and basic.

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, a widely used library 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 (1.4 MB for the default size).

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.