minetest-tiler/README.md

2.9 KiB

Minetest Tiler

An easy wrapper for Minetest Mapper generating tiles for web.

The output can be used with Leaflet.

Demo map here (Juneland Survival)

Use

Choose the strategy you prefer between complete periodic generation and cached on-demand generation:

Python generator

Runs minetestmapper once for a given part of the map. You can run it with cron. You also need an external webserver (e.g. Apache, Nginx) to serve the generated tiles.

Dependencies:

Edit the settings in mtmapper.py according to your configuration.

python3 mtmapper.py

Depending on the world and the settings (number of zoom levels, number of blocks), it may take a while.

Rust mapserver

A program that runs minetestserver automatically and serves cached tiles through an included webserver. You can run it as a daemon.

Dependencies:

cd mapserver
cargo build --release
./target/release/mapserver --help
# Example with arguments:
./target/release/mapserver -w /var/games/minetest-server/.minetest/worlds/juneland-survival/ -p /home/tuxmain/minetestmapper/minetestmapper -- --drawalpha --max-y 2000 --colors /home/tuxmain/Colors.txt/colors.txt

Web interface

Both generation methods need a webpage(can be served by a webserver like Apache, Nginx):

Edit index.html (change the tiles URL, title, attribution and points of interest).

You can keep my server as a CDN for Leaflet, but it's preferable to host your own copy of Leaflet.

Share

If you make substancial modifications or fixes to the backend (Python) code, please share (Affero clause). An accessible hyperlink to the file on the map webpage is sufficient, but a PR is welcome.

License

CopyLeft 2020-2022 Pascal Engélibert

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.