docs
This commit is contained in:
parent
f30590990f
commit
041131dee4
74
doc/config.md
Normal file
74
doc/config.md
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
|
||||||
|
# Configuration
|
||||||
|
|
||||||
|
All config options reside in the `mapserver.json` file with the default values
|
||||||
|
Please stop the server if you make any changes there.
|
||||||
|
|
||||||
|
The mapserver will generate a fresh `mapserver.json` if there is none at startup.
|
||||||
|
|
||||||
|
## Example json
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"port": 8080,
|
||||||
|
"enablerendering": true,
|
||||||
|
"webdev": false,
|
||||||
|
"webapi": {
|
||||||
|
"enablemapblock": false,
|
||||||
|
"secretkey": "ZJoSpysiKGlYexof"
|
||||||
|
},
|
||||||
|
"renderstate": {
|
||||||
|
"initialrun": false,
|
||||||
|
"legacyprocessed": 16111,
|
||||||
|
"lastx": 3,
|
||||||
|
"lasty": 3,
|
||||||
|
"lastz": 8,
|
||||||
|
"lastmtime": 0
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "Base",
|
||||||
|
"to": 160,
|
||||||
|
"from": -16
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"renderingfetchlimit": 1000,
|
||||||
|
"renderingjobs": 2,
|
||||||
|
"renderingqueue": 100
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
### port
|
||||||
|
The port on which the server listens to
|
||||||
|
|
||||||
|
### webapi.secretkey
|
||||||
|
The generated secret for the [mod bridge](./install)
|
||||||
|
|
||||||
|
### layers
|
||||||
|
The layers as a list
|
||||||
|
More layers can be added here:
|
||||||
|
```json
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "Base",
|
||||||
|
"to": 160,
|
||||||
|
"from": -16
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Space",
|
||||||
|
"to": 1600,
|
||||||
|
"from": 1000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
```
|
||||||
|
*from* and *to* are in blocks (not mapblocks)
|
||||||
|
Don't reuse the `id` after the tiles are generated.
|
||||||
|
If you make more substantial changes here you may have to remove all
|
||||||
|
existing tiles and start rendering from scratch.
|
||||||
|
|
||||||
|
### renderingjobs
|
||||||
|
Number of cores to use for rendering, defaults to all available cores
|
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
# Contributions
|
||||||
|
|
||||||
|
Contributions are always welcome via pull/merge requests
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# Mapserver installation
|
||||||
|
|
||||||
|
**Please make a backup of your world in case something goes wrong**
|
||||||
|
|
||||||
|
* Download the binary from the [releases](https://github.com/thomasrudin-mt/mapserver/releases) for your architecture and platform
|
||||||
|
* Drop the binary into your world folder (the one with the `world.mt` and `map.sqlite` files)
|
||||||
|
* Start the mapserver via command-line: `./mapserver` or `./mapserver.exe`
|
||||||
|
* Point your browser to `http://127.0.0.1:8080`
|
||||||
|
|
||||||
|
For additional infos (lag,time,players) on the mapserver interface you should install the [mapserver-mod](mod.md)
|
34
doc/mod.md
Normal file
34
doc/mod.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
# Mapserver mod
|
||||||
|
|
||||||
|
If the `mapserver-mod` is installed and configured
|
||||||
|
you get more realtime-data from within your minetest-world:
|
||||||
|
|
||||||
|
* Current players with their positions
|
||||||
|
* Current time and max lag
|
||||||
|
|
||||||
|
You can use the `mapserver-mod` either passive or active:
|
||||||
|
* *Passive* Makes some additional markers available (POI, etc)
|
||||||
|
* *Active* Communicates with the mapserver and sends realtime data (players, lag, time)
|
||||||
|
|
||||||
|
## Installing and configuring the bridge-mod
|
||||||
|
|
||||||
|
The mod itself is available in the git [repo](./mapserver_mod)
|
||||||
|
or as a zip package in the [releases](./releases)
|
||||||
|
|
||||||
|
## Active mode
|
||||||
|
|
||||||
|
The mod communicates via http with the mapserver.
|
||||||
|
You need to configure the *url* and the *secretkey* in your `minetest.conf`
|
||||||
|
|
||||||
|
* Install the mapserver mod in your minetest instance
|
||||||
|
* Copy the `secretkey` from your `mapserver.json` (this is an autogenerated key)
|
||||||
|
* Enable http for the `mapserver` mod in your `minetest.conf`
|
||||||
|
* Configure your `minetest.conf` with the settings: `mapserver.url` and `mapserver.key`
|
||||||
|
|
||||||
|
Example config:
|
||||||
|
```
|
||||||
|
secure.http_mods = mapserver
|
||||||
|
mapserver.url = http://127.0.0.1:8080
|
||||||
|
mapserver.key = ZJoSpysiKGlYexof
|
||||||
|
```
|
29
doc/params.md
Normal file
29
doc/params.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
# Parameters
|
||||||
|
|
||||||
|
Mapserver command line parameters:
|
||||||
|
|
||||||
|
## Help
|
||||||
|
`./mapserver -help`
|
||||||
|
Shows all available commands
|
||||||
|
|
||||||
|
|
||||||
|
## Version
|
||||||
|
`./mapserver -version`
|
||||||
|
Shows the version, architecture and operating system:
|
||||||
|
|
||||||
|
```
|
||||||
|
Mapserver version: 0.0.2
|
||||||
|
OS: linux
|
||||||
|
Architecture: amd64
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Debug mode
|
||||||
|
`./mapserver -debug`
|
||||||
|
Enables the debug mode
|
||||||
|
It is advisable to pipe the debug output to a file for later inspection:
|
||||||
|
|
||||||
|
```
|
||||||
|
./mapserver -debug > debug.txt
|
||||||
|
```
|
44
readme.md
44
readme.md
@ -1,45 +1,45 @@
|
|||||||
Minetest mapserver
|
Minetest mapserver
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Realtime mapserver for Minetest
|
Realtime mapserver for [Minetest](https://minetest.net)
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
|
||||||
|
* [Installation](doc/install.md)
|
||||||
|
* [Mapserver mod](doc/mod.md)
|
||||||
|
* [Parameters](doc/params.md)
|
||||||
|
* [Configuration](doc/config.md)
|
||||||
|
* [Contribution](doc/contrib.md)
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
## Current features
|
## Current features
|
||||||
|
|
||||||
* Initial and incremental map rendering
|
* Initial and incremental map rendering
|
||||||
|
* Realtime player and world stats
|
||||||
* Configurable layers (default: "Base" from y -16 to 160)
|
* Configurable layers (default: "Base" from y -16 to 160)
|
||||||
|
|
||||||
## Planned Features
|
## Planned Features
|
||||||
|
|
||||||
* POI markers / mod integration
|
* POI markers / mod integration
|
||||||
* Player markers and infos (HP, breath, etc)
|
* Player infos (HP, breath, etc)
|
||||||
|
* LCD Displays as markers
|
||||||
* Street names / Train stuff
|
* Street names / Train stuff
|
||||||
|
* City borders
|
||||||
# Installation / Getting started
|
|
||||||
|
|
||||||
**Please make a backup of your world in case something goes wrong**
|
|
||||||
|
|
||||||
* Download the binary from the [releases](https://github.com/thomasrudin-mt/mapserver/releases) for your architecture and platform
|
|
||||||
* Drop the binary into your world folder (the one with the `world.mt` and `map.sqlite` files)
|
|
||||||
* Start the mapserver via command-line: `./mapserver` or `./mapserver.exe`
|
|
||||||
* Point your browser to `http://127.0.0.1:8080`
|
|
||||||
|
|
||||||
# Configuration
|
|
||||||
|
|
||||||
All config options reside in the `mapserver.json` file with the default values
|
|
||||||
Please stop the server if you make any changes there.
|
|
||||||
|
|
||||||
# Development state
|
# Development state
|
||||||
|
|
||||||
* Early beta
|
|
||||||
* Working basic features (map rendering)
|
* Working basic features (map rendering)
|
||||||
* Successor of http://github.com/thomasrudin-mt/minetest-tile-server
|
* Successor of http://github.com/thomasrudin-mt/minetest-tile-server
|
||||||
|
|
||||||
|
# Screenshots
|
||||||
|
|
||||||
|
## Web interface
|
||||||
|
<img src="./pics/web.png">
|
||||||
|
|
||||||
|
## Terminal
|
||||||
|
<img src="./pics/terminal.png">
|
||||||
|
|
||||||
# Bugs
|
# Bugs
|
||||||
|
|
||||||
There will be bugs, please file them in the *issues* page.
|
There will be bugs, please file them in the [issues](./issues) page.
|
||||||
|
|
||||||
# Contributions
|
|
||||||
|
|
||||||
Contributions are always welcome via pull/merge requests
|
|
||||||
|
@ -8,7 +8,6 @@ type ParamsType struct {
|
|||||||
Help bool
|
Help bool
|
||||||
Version bool
|
Version bool
|
||||||
Debug bool
|
Debug bool
|
||||||
Dumpconfig bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func Parse() ParamsType {
|
func Parse() ParamsType {
|
||||||
|
Loading…
Reference in New Issue
Block a user