Go to file
Thomas Rudin 86c32221fb
Merge pull request #46 from alek13/patch-1
add support for block versions >25 and <28
2019-01-31 06:42:23 +01:00
docs split doc 2018-12-20 08:16:42 +01:00
img update readme 2018-07-18 17:25:19 +02:00
integration db upgrade & codegen 2018-06-28 09:46:54 +02:00
pics more block pics 2018-07-31 16:34:58 +02:00
src add support for block versions >25 and <28 2019-01-30 23:09:35 +03:00
testdata/mapblocks optional local mapblock saving for unittesting 2018-11-27 13:56:52 +01:00
tileserver_mod digiline message block 2018-09-25 16:10:34 +02:00
.dockerignore ignore mapblocks dir 2018-12-20 08:12:41 +01:00
.gitignore ignore stuff 2018-11-27 14:09:22 +01:00
Dockerfile expose 2018-05-02 14:26:27 +02:00
Makefile proper volume structure and testdata in docker build 2018-12-14 20:22:05 +01:00
cleanup.sql initial rendering config 2018-07-02 11:39:58 +02:00
coord-system.odg coord system 2018-05-03 14:12:42 +02:00
package.json add proxy to pandorabox tileserver 2018-09-06 09:46:03 +02:00
pom.xml pom cleanups 2018-12-14 20:08:28 +01:00
proxy.js dynamic backend proxy 2018-12-18 16:56:45 +01:00
readme.md split doc 2018-12-20 08:16:42 +01:00
tileserver.properties unsynchronized tile rendering 2018-12-19 17:08:33 +01:00

readme.md

Minetest tileserver

Near realtime tileserver for minetest

Overview

A standalone java-based tile-server for minetest. Renders the mapblocks on-demand as an interactive map and displays the current players. As players interact with the map the changed MapBlocks get re-rendered and updated in the web-client (near-realtime, 20 seconds default)

The resulting tiles are cached in a file-backend and served to the client if unchanged.

Development state

  • Tested and live with one Production-Instance (see Demo)
  • Please file issues/requests in the github issue-tracker

Demo

Compatibility

Requirements:

  • Postgresql Database for minetest backend (existing)
  • Java runtime (8+)
  • Modern machine with enough (2GB+) RAM and CPU

Testing was done on a fairly new minetest version (0.4.17) There will be failures in the MapBlock Parser if the version found is not met (older minetest-versions).

Please create an issue with minetest-version and MapBlock info in the bug-tracker if that happens to you.

Installing

  • Download the jar in the releases section
  • Backup your minetest database (THIS IS IMPORTANT!!) as the db schema gets updated (see How it works)
  • Configure the database connection according to the Configuration section if they are not default value
  • Start the server with: java -jar tileserver.jar

Configuring

See config

How it works

The blocks table in the minetest database gets a new column for the modification time. Triggers for insert and update on the table ensure the time gets updated after each change:

alter table blocks add column mtime bigint not null default 0;
create index BLOCKS_TIME on blocks(mtime);

create or replace function on_blocks_change() returns trigger as
$BODY$
BEGIN
    NEW.mtime = floor(EXTRACT(EPOCH from now()) * 1000);
    return NEW;
END;
$BODY$
LANGUAGE plpgsql;

create trigger blocks_update
 before insert or update
 on blocks
 for each row
 execute procedure on_blocks_change();

These changes get applied atomatically with the initial DB-Migration, so please create a backup before starting the Tileserver!!

With this information and the modification-time on the created tiles the periodically scheduled Updater-Job removes the stale Tiles in the tile-cache.

On the next access (browsing on the web-interface to the coordinates) the Tile gets re-rendered.

Building

Requirements:

  • Java 8+
  • Maven 3+

Build, test, install:

mvn clean install

With Docker

  • See the Makefile

Contributing

  • Issues, recommendations and pull-requests are welcome