mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-08 03:00:26 +01:00
Document the player tracking.
This commit is contained in:
parent
5172e02380
commit
0cbc643e21
36
SETUP.md
36
SETUP.md
|
@ -13,6 +13,8 @@ Setting up MTSatellite takes six steps:
|
|||
5. [Start the web server `mtwebmapper`](#markdown-header-start-the-web-server-mtwebmapper)
|
||||
6. [Configure and restart the Minetest server](#markdown-header-configure-and-restart-the-minetest-server)
|
||||
|
||||
Experimental: Optionally you can enable on map tracking of logged in players(#markdown-header-enable-on-map-tracking-of-logged-in-players).
|
||||
|
||||
## Backup your world
|
||||
|
||||
MTSatellite is still young. So stop your running Minetest server and make a backup of your world
|
||||
|
@ -153,3 +155,37 @@ backend with a Redis configuration:
|
|||
You may have to set `redis_port` too if you run `mtredisalize` not on port 6379.
|
||||
|
||||
Now we are all done and you can fire your Minetest server up again. :-)
|
||||
|
||||
## Enable on map tracking of logged in players
|
||||
MTSatellite can display logged in players on the map.
|
||||
This is an experimental feature and its only confirmed working on GNU/Linux systems.
|
||||
OS X and \*BSD should work, too.
|
||||
|
||||
To use it install the [track_players](https://bitbucket.org/s_l_teichmann/mtsatellite/src/default/mods/track_players)
|
||||
mod. Simple add a checkout to your mods folder and activate it in your world.mt file.
|
||||
|
||||
...
|
||||
load_mod_track_players = true
|
||||
...
|
||||
|
||||
This minetest mod writes players position to a [named pipe aka FIFO](http://en.wikipedia.org/wiki/Named_pipe).
|
||||
`mtwebmapper` is able to read from this file and serve these positions as GeoJSON to the browser.
|
||||
The FIFO has to be created _before_ the start of the minetest server.
|
||||
|
||||
$ mkfifo /tmp/mt_players_fifo
|
||||
|
||||
The path to the FIFO can be changed in track_players/init.lua
|
||||
|
||||
...
|
||||
local fifo_path = "/tmp/mt_players_fifo"
|
||||
...
|
||||
|
||||
To use the feature in `mtwebmapper` add the argument `-players=/tmp/mt_players_fifo` to the list
|
||||
of command arguments.
|
||||
|
||||
*Caution*: Please start `mtwebmapper` before the minetest server! Caused by the nature of FIFOs and the
|
||||
single threaded execution of minetest mods the minetest server will block if there is no consumer
|
||||
reading the player positions.
|
||||
|
||||
The player tracking is well integrated with the websocket support. If you enable websockets you will
|
||||
be able to see the players moving on the map.
|
||||
|
|
Loading…
Reference in New Issue
Block a user