Experimental map generator for Minetest, implementing river networks, lakes, and erosion.
Go to file
Gael-de-Sailly 803114aaab Generate data in `river_data` instead of `data` 2020-11-14 19:12:12 +01:00
demo_data Change folder structure: data files are now in a directory. 2020-04-26 23:29:36 +02:00
terrainlib Moved Python files inside a folder (package), except the 2 that are directly executable 2020-11-14 17:35:27 +01:00
.gitignore Generate data in `river_data` instead of `data` 2020-11-14 19:12:12 +01:00
README.md Change folder structure: data files are now in a directory. 2020-04-26 23:29:36 +02:00
generate.py Generate data in `river_data` instead of `data` 2020-11-14 19:12:12 +01:00
geometry.lua Comment and clarify 2020-04-26 17:13:38 +02:00
heightmap.lua Reverse axes order for heightmaps (iterate in Z direction first instead of X) 2020-07-21 12:46:23 +02:00
init.lua Use biomegen.generate_all 2020-11-14 17:35:03 +01:00
load.lua Fix file opening mode on the Lua side, to avoid crashes on Windows 2020-11-14 17:31:36 +01:00
mod.conf Added support for biomegen mod 2020-11-14 17:35:03 +01:00
noises.lua Added glaciers, and re-organized noise definitions 2020-05-24 12:09:21 +02:00
polygons.lua Generate data in `river_data` instead of `data` 2020-11-14 19:12:12 +01:00
settings.lua Added support for biomegen mod 2020-11-14 17:35:03 +01:00
terrain.conf Python side: rework config system. 2020-11-14 12:19:40 +01:00
terrain_higher.conf Python side: rework config system. 2020-11-14 12:19:40 +01:00
view_map.py Moved Python files inside a folder (package), except the 2 that are directly executable 2020-11-14 17:35:27 +01:00

README.md

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

By default, the mod contains a demo 400x400 map (so you can start the game directly), but it is recommended that you run the pre-processing script to generate a new map before world creation, if you can.

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.

If you have matplotlib installed, the script view_map.py can be used to get a map preview. Example:

./view_map.py 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.