mapgen_rivers/README.md

30 lines
1.3 KiB
Markdown
Raw Normal View History

2020-04-10 17:29:32 +02:00
mapgen_rivers
=============
2020-04-26 17:13:38 +02:00
Procedural map generator for Minetest 5.x. Focused on river networks, and features valley erosion and lakes.
2020-04-10 17:29:32 +02:00
Contains two distinct programs: Python scripts for pre-processing, and Lua scripts to generate the map on Minetest.
2020-04-26 17:13:38 +02:00
![Screenshot](https://user-images.githubusercontent.com/6905002/79541028-687b3000-8089-11ea-9209-c23c15d75383.png)
2020-04-12 18:17:57 +02:00
2020-04-10 17:29:32 +02:00
# 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:
2020-04-26 17:13:38 +02:00
- `numpy` and `scipy`, widely used libraries for numerical calculations
2020-04-10 17:29:32 +02:00
- `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
```
2020-04-26 17:13:38 +02:00
For a default 401x401 map, it should take between 1 and 2 minutes. It will generate 5 files directly in the mod folder, containing the map data.
2020-04-10 17:29:32 +02:00
## 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.