leaftest/README.md

53 lines
2.4 KiB
Markdown
Raw Normal View History

# Leaftest
2015-02-19 16:02:56 +01:00
2016-01-17 21:07:08 +01:00
Leaftest consists of a bash script that uses [minetestmapper](https://github.com/Rogier-5/minetest-mapper-cpp) to display the map on a leaflet based zoomable sloppy map.
For an example, see [VanessaE survival server's map](https://daconcepts.com/vanessa/hobbies/minetest/worldmaps/Survival_World/map.html).
2015-02-19 16:02:56 +01:00
2016-01-17 21:07:08 +01:00
The map is generated through many invocations of `minetestmapper` with small chunks,
instead of one invocation with the whole map, which gets cropped later.
This will keep memory requirements for all tools mostly unrelated to the map size.
2016-01-17 20:03:16 +01:00
### Dependencies
Ensure that you have:
2015-02-19 16:02:56 +01:00
2015-02-19 16:12:09 +01:00
-bash
2015-02-19 19:21:03 +01:00
-imagemagick
2015-02-19 16:12:09 +01:00
-minetestmapper
2015-02-19 16:02:56 +01:00
Note that you need a minetestmapper which supports precise node coordinates,
the official minetestmapper doesn't support it (yet), but the one linked above
does.<br/>
2016-01-17 20:03:16 +01:00
If you want to host the map on the world wide web, you'll need a web server.
### Running the mapper script
2015-02-19 16:02:56 +01:00
Get a clone:
```
git clone --recursive https://github.com/est31/leaftest.git
```
To start the mapping, do:
```
MAPPERDIR=dir/containing/minetestmapper ./mapper.sh path/to/world spawnx,spawny dimension
```
2016-01-17 21:07:08 +01:00
Make sure that you have provided a `colors.txt` file, e.g. by putting it inside the world directory.
2015-02-19 16:02:56 +01:00
2016-01-17 21:07:08 +01:00
The `dimension` number specifies the width and height of the map that should be rendered, centering with your spawn position. `dimension` should be a multiple of `8*256 = 2048`. `6144` is a good starting value.
The list of parameters passed via the invocation is fixed.
Further options are passed to the mapper script via the
environment variable mechanism (as observable above):
2015-02-19 16:02:56 +01:00
2016-01-17 20:03:16 +01:00
* `MAPPERDIR` must point to the path that contains the minetestmapper executable
* `MAPPERPARAMS` can be used to pass custom parameters to the `minetestmapper` invocation
2016-01-17 21:07:08 +01:00
* `JOBNUM` can be set to an integer > 1 to run `JOBNUM` many processes in parallel to speed up the mapping process
2016-01-17 20:03:16 +01:00
After mapping has finished, you can open the `www/map.html` file. If you want to publish your results, you can either symlink the `www` directory into your `/var/www` directory, or copy it. Due to usage of relative symlinks, you should use `rsync -L`, so that the copied directory doesn't contain symlinks.
2016-01-17 19:34:33 +01:00
2016-01-17 20:33:08 +01:00
### License
2016-01-17 20:03:16 +01:00
Copyright (c) 2015-2016 est31, License: MIT.
2016-01-17 19:34:33 +01:00
Parts base on unilicensed script from [LibertyLand](http://www.ayntest.net/pages/liberty-land-map.html) minetest server, [github here](https://github.com/ayntest/ayntest.github.io).