GithubHelp home page GithubHelp logo

minetest / minetestmapper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shadowninja/minetest-mapper-cpp

107.0 29.0 40.0 356 KB

Generates a overview image of a minetest map.

License: BSD 2-Clause "Simplified" License

CMake 7.07% C++ 79.86% C 0.29% Shell 2.30% Roff 3.24% Lua 1.62% Python 5.61%

minetestmapper's Introduction

Minetest Mapper C++

Minetestmapper generates an overview image from a Minetest map.

A port of minetestmapper.py to C++ from https://github.com/minetest/minetest/tree/0.4.17/util. This version is both faster and provides more features than the now obsolete Python script.

Minetestmapper ships with a colors.txt file for Minetest Game, if you use a different game or have many mods installed you should generate a matching colors.txt for better results. The generate_colorstxt.py script in the util folder exists for this purpose, detailed instructions can be found within.

Requirements

  • C++ compiler, zlib, zstd
  • libgd
  • sqlite3
  • LevelDB (optional)
  • hiredis (optional)
  • Postgres libraries (optional)

on Debian/Ubuntu:

sudo apt install cmake libgd-dev libhiredis-dev libleveldb-dev libpq-dev libsqlite3-dev zlib1g-dev libzstd-dev

on openSUSE:

sudo zypper install gd-devel hiredis-devel leveldb-devel postgresql-devel sqlite3-devel zlib-devel libzstd-devel

for Windows:

Minetestmapper for Windows can be downloaded from the Releases section.

After extracting the archive, it can be invoked from cmd.exe:

cd C:\Users\yourname\Desktop\example\path
minetestmapper.exe --help

Compilation

cmake . -DENABLE_LEVELDB=1
make -j$(nproc)

Usage

minetestmapper has two mandatory paremeters, -i (input world path) and -o (output image path).

./minetestmapper -i ~/.minetest/worlds/my_world/ -o map.png

Parameters

bgcolor:
Background color of image, e.g. --bgcolor '#ffffff'
scalecolor:
Color of scale marks and text, e.g. --scalecolor '#000000'
playercolor:
Color of player indicators, e.g. --playercolor '#ff0000'
origincolor:
Color of origin indicator, e.g. --origincolor '#ff0000'
drawscale:
Draw scale(s) with tick marks and numbers, --drawscale
drawplayers:
Draw player indicators with name, --drawplayers
draworigin:
Draw origin indicator, --draworigin
drawalpha:
Allow nodes to be drawn with transparency (e.g. water), --drawalpha
extent:
Don't output any imagery, just print the extent of the full map, --extent
noshading:
Don't draw shading on nodes, --noshading
noemptyimage:
Don't output anything when the image would be empty, --noemptyimage
min-y:
Don't draw nodes below this y value, e.g. --min-y -25
max-y:
Don't draw nodes above this y value, e.g. --max-y 75
backend:
Override auto-detected map backend; supported: sqlite3, leveldb, redis, postgresql, e.g. --backend leveldb
geometry:
Limit area to specific geometry (x:z+w+h where x and z specify the lower left corner), e.g. --geometry -800:-800+1600+1600
zoom:
Apply zoom to drawn nodes by enlarging them to n*n squares, e.g. --zoom 4
colors:
Override auto-detected path to colors.txt, e.g. --colors ../minetest/mycolors.txt
scales:
Draw scales on specified image edges (letters t b l r meaning top, bottom, left and right), e.g. --scales tbr
exhaustive:
Select if database should be traversed exhaustively or using range queries, available: never, y, full, auto
Defaults to auto. You shouldn't need to change this, but doing so can improve rendering times on large maps.
For these optimizations to work it is important that you set min-y and max-y when you don't care about the world below e.g. -60 and above 1000 nodes.

minetestmapper's People

Contributors

bilbo2 avatar clavinet avatar dmoerner avatar jakubvanek avatar mireq avatar nestorfish avatar rodentofunusualsize avatar rogier-5 avatar schuellerf avatar sfan5 avatar shadowninja avatar srinivas32 avatar wsor4035 avatar zeuner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minetestmapper's Issues

Cannot build on Debian/Ubuntu (documentation issue?)

Trying to follow the sparse README but to no avail - this is what I have done both on a fresh Debian 8 x64, and a fresh Ubuntu 16.04 x64, with the same result

apt-get update && apt-get install libgd3 git build-essential cmake sqlite3
git clone https://github.com/minetest/minetestmapper
cd minetestmapper
cmake .

I get the following

-- The CXX compiler identification is GNU 4.9.2
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- libgd library: LIBGD_LIBRARY-NOTFOUND
-- libgd headers: LIBGD_INCLUDE_DIR-NOTFOUND
CMake Error at CMakeLists.txt:32 (message):
  libgd not found!

I don't know what envs to set or even what files it is looking for. Tried to set export LIBGD_LIBRARY=/usr/lib/x86_64-linux-gnu/libgd.so.3 but that was not the answer.

Can you please flesh out the README a little more?

Thanks

Slow, possibly broken rendering if legacy entries are present in colors.txt

Megaf initially spotted the trigger for the long overview map rendering times he and I had been fighting with today: If your colors.txt has the old legacy entries at the start of the file, i.e. stuff of the form:

xxx xxx xxx xxx #CONTENT_XXXXX

...the mapper will take a very long time (at least an hour for what should take 3-4 minutes) to produce an image, and what it produces may end up being nothing but an all-white image (perhaps with the scale at the side/top if --drawscale is specified). Simply deleting those lines from the start of the file is sufficient to workaround the issue.

After working backward through the history, this commit appears to be the cause: 84d46ab

Before this commit, colors.txt with the legacy entries takes about as much time as one would expect.

Tiled output idea

I currently use minetestmapper to generate tiles for a slippy map using the --geometry option to create the tiles.

For a big map, this is very inefficient, because minetestmapper will loop over all blocks (chunks?) in the whole world to generate each tile.

Generating the whole world as 1 big image and then chopping it up currently leads to crashes (in gd?) because the image gets too big. But even when fixed this would lead to very unwieldy big images.

I have some ideas about looping once over the blocks (in loadBlocks) and keeping multiple m_position arrays for different tiles, sorting the blocks into the different m_position arrays. and then afterwards call rendermap which each position array to generate the differing tiles, re-using the gd image.

However, this would add quite some new functionality, so I didn't want to jump in and just create it without first deliberating a bit about the api and implementation

I propose a new flag:
-- tiled , where wxh is the requested tile size. The size passed to --geometry (or the autodetected size) would be rounded up to a multiple of the tile size. and tile sizes must be a multiple of 16.

then we also need a convention to generate the output filenames. I'd think it would be best to keep it simple end just use an xxxx_yyyy_basename . with xxxx and yyyy the tile numbers and basename the name specified with -o. I put it at the end to not have to worry about the extension :-)

or I could use the actual coordinates in the filenames?

What do you think?

Bad mapblock causes the mapper to segfault

Title says it all :-)

If the mapper runs across a bad mapblock in the source map file (at least in the case of an sqlite map), it will eventually segfault. Here's an example backtrace, where the map in question is known to have a bad block at or near 0,+31000,0.

root@ks4006351:/home/minetest/minetestmapper# gdb --args /home/minetest/minetestmapper/minetestmapper         --drawscale         --geometry -5000:-7500+12000+15000 -i /home/minetest/.minetest/worlds/Vanilla_World/ -o /home/vanessa/www/vanessa/hobbies/minetest/worldmaps/Vanilla_World.png
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/minetest/minetestmapper/minetestmapper...done.
(gdb) run
Starting program: /home/minetest/minetestmapper/minetestmapper --drawscale --geometry -5000:-7500+12000+15000 -i /home/minetest/.minetest/worlds/Vanilla_World/ -o /home/vanessa/www/vanessa/hobbies/minetest/worldmaps/Vanilla_World.png
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007e1378eef4a2 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x00007e1378eef4a2 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007e13796b23a0 in char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#2  0x00007e13796b249d in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#3  0x000000000041f725 in TileGenerator::renderMap (this=0x7fffffffe750)
    at /home/minetest/minetestmapper/TileGenerator.cpp:435
        nodeId = 31520
        nameLen = 23388
        name = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x6533bb8 "414457, [\"_hack_other_info\"] = \"return { [\\\"itemstring\\\"] = \\\"default:sapling 3\\\" }\" }"}}
        i = 919
        numMappings = 50265
        pos = @0xa8d4820: {x = -1, y = 1937, z = 0}
        dataOffset = 25614128
---Type <return> to continue, or q <return> to quit---
        mapData = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<unsigned char>> = {<__gnu_cxx::new_allocator<unsigned char>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x6ec7f58 ""}}
        mapMetadata = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<unsigned char>> = {<__gnu_cxx::new_allocator<unsigned char>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x466ea38 ""}}
        data = 0x7e13741fd028 "\031\f\002\002x\234\355\301\061\001"
        staticObjectCount = 28023
        length = 25614370
        version = 25 '\031'
        decompressor = {
          m_data = 0x7e13741fd028 "\031\f\002\002x\234\355\301\061\001", 
          m_seekPos = 52, m_size = 25614370}
        allReaded = true
        it = {_M_node = 0xa8d4810}
        xPos = -1
        blockStack = @0xb1d7ca8: {<std::_List_base<std::pair<BlockPos, std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > >, std::allocator<std::pair<BlockPos, std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > > > >> = {
            _M_impl = {<std::allocator<std::_List_node<std::pair<BlockPos, std::---Type <return> to continue, or q <return> to quit---
basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > > > >> = {<__gnu_cxx::new_allocator<std::_List_node<std::pair<BlockPos, std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > > > >> = {<No data fields>}, <No data fields>}, 
              _M_node = {_M_next = 0xa8d4810, 
                _M_prev = 0x722cf10}}}, <No data fields>}
        position = {_M_node = 0x85e47e0}
        zPos = 256
        blocks = {_M_t = {
            _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<short const, std::list<std::pair<BlockPos, std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > >, std::allocator<std::pair<BlockPos, std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > > > > > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<short const, std::list<std::pair<BlockPos, std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > >, std::allocator<std::pair<BlockPos, std::basic_string<unsigned char, std::char_traits<unsigned char>, std::allocator<unsigned char> > > > > > > >> = {<No data fields>}, <No data fields>}, 
              _M_key_compare = {<std::binary_function<short, short, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, 
                _M_parent = 0x8763960, _M_left = 0x2d23800, 
                _M_right = 0x3abbda0}, _M_node_count = 957}}}
---Type <return> to continue, or q <return> to quit---
        zPosition = {_M_node = 0x3d49780}
        zlist = {<std::_List_base<int, std::allocator<int> >> = {
            _M_impl = {<std::allocator<std::_List_node<int> >> = {<__gnu_cxx::new_allocator<std::_List_node<int> >> = {<No data fields>}, <No data fields>}, 
              _M_node = {_M_next = 0x39c6080, 
                _M_prev = 0x49da620}}}, <No data fields>}
#4  0x000000000041eb37 in TileGenerator::generate (this=0x7fffffffe750, 
    input=..., output=...)
    at /home/minetest/minetestmapper/TileGenerator.cpp:251
        input_path = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x28688b8 "/home/minetest/.minetest/worlds/Vanilla_World/"}}
#5  0x000000000042a2a9 in main (argc=8, argv=0x7fffffffeaf8)
    at /home/minetest/minetestmapper/mapper.cpp:156
        generator = {m_bgColor = {r = 255 '\377', g = 255 '\377', 
            b = 255 '\377', a = 0 '\000'}, m_scaleColor = {r = 0 '\000', 
            g = 0 '\000', b = 0 '\000', a = 0 '\000'}, m_originColor = {
            r = 255 '\377', g = 0 '\000', b = 0 '\000', a = 0 '\000'}, 
          m_playerColor = {r = 255 '\377', g = 0 '\000', b = 0 '\000', 
            a = 0 '\000'}, m_drawOrigin = false, m_drawPlayers = false, 
          m_drawScale = true, m_drawAlpha = false, m_shading = true, 
          m_border = 40, m_backend = {static npos = <optimized out>, 
---Type <return> to continue, or q <return> to quit---
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x2868768 "sqlite3"}}, 
          m_db = 0x2868780, m_image = 0x4072e80, m_blockPixelAttributes = {
            _vptr.PixelAttributes = 0x42d290, m_pixelAttributes = {0x33071e40, 
              0x330895d0, 0x330a0d60, 0x330b84f0, 0x330cfc80, 0x330e7410, 
              0x330feba0, 0x33116330, 0x3312dac0, 0x33145250, 0x3315c9e0, 
              0x33174170, 0x3318b900, 0x331a3090, 0x331ba820, 0x331d1fb0, 
              0x331e9740, 0x33200ed0}, m_width = 12017}, m_xMin = -313, 
          m_xMax = 437, m_zMin = -469, m_zMax = 468, m_yMin = -30000, 
          m_yMax = 30000, m_geomX = -313, m_geomY = -469, m_geomX2 = 437, 
          m_geomY2 = 468, m_mapWidth = 12016, m_mapHeight = 15008, 
          m_positions = {<std::_List_base<std::pair<int, int>, std::allocator<std::pair<int, int> > >> = {
              _M_impl = {<std::allocator<std::_List_node<std::pair<int, int> > >> = {<__gnu_cxx::new_allocator<std::_List_node<std::pair<int, int> > >> = {<No data fields>}, <No data fields>}, _M_node = {_M_next = 0x9fd8ac0, 
                  _M_prev = 0x7410f40}}}, <No data fields>}, m_nameMap = {
            _M_t = {
              _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<int const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >> = {<No data fields>}, <No data fields>}, 
---Type <return> to continue, or q <return> to quit---
                _M_key_compare = {<std::binary_function<int, int, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, 
                  _M_parent = 0x5421620, _M_left = 0x3c7da20, 
                  _M_right = 0x55f6da0}, _M_node_count = 86}}}, m_colors = {
            _M_t = {
              _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ColorEntry> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ColorEntry> > >> = {<No data fields>}, <No data fields>}, 
                _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x286cd70, 
                  _M_left = 0x286bbe0, _M_right = 0x289df40}, 
                _M_node_count = 2019}}}, m_readedPixels = {
            0 <repeats 16 times>}, m_unknownNodes = {_M_t = {
              _M_impl = {<std::allocator<std::_Rb_tree_node<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<No data fields>}, <No data fields>}, 
                _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::cha---Type <return> to continue, or q <return> to quit---
r_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0xa481960, 
                  _M_left = 0x64c6ff0, _M_right = 0x4d47b60}, 
                _M_node_count = 27}}}, m_blockAirId = -1, m_blockIgnoreId = -1}
        option_index = 12
        c = -1
        long_options = {{name = 0x42d780 "help", has_arg = 0, flag = 0x0, 
            val = 104}, {name = 0x42d785 "input", has_arg = 1, flag = 0x0, 
            val = 105}, {name = 0x42d78b "output", has_arg = 1, flag = 0x0, 
            val = 111}, {name = 0x42d792 "bgcolor", has_arg = 1, flag = 0x0, 
            val = 98}, {name = 0x42d79a "scalecolor", has_arg = 1, flag = 0x0, 
            val = 115}, {name = 0x42d7a5 "origincolor", has_arg = 1, 
            flag = 0x0, val = 114}, {name = 0x42d7b1 "playercolor", 
            has_arg = 1, flag = 0x0, val = 112}, {
            name = 0x42d7bd "draworigin", has_arg = 0, flag = 0x0, val = 82}, {
            name = 0x42d7c8 "drawplayers", has_arg = 0, flag = 0x0, val = 80}, 
          {name = 0x42d7d4 "drawscale", has_arg = 0, flag = 0x0, val = 83}, {
            name = 0x42d7de "drawalpha", has_arg = 0, flag = 0x0, val = 101}, {
            name = 0x42d7e8 "noshading", has_arg = 0, flag = 0x0, val = 72}, {
            name = 0x42d7f2 "geometry", has_arg = 1, flag = 0x0, val = 103}, {
            name = 0x42d7fb "min-y", has_arg = 1, flag = 0x0, val = 97}, {
            name = 0x42d801 "max-y", has_arg = 1, flag = 0x0, val = 99}, {
            name = 0x42d807 "backend", has_arg = 1, flag = 0x0, val = 100}}
---Type <return> to continue, or q <return> to quit---
        input = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x28ac1d8 "/home/minetest/.minetest/worlds/Vanilla_World/"}}
        output = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x2868848 "/home/vanessa/www/vanessa/hobbies/minetest/worldmaps/Vanilla_World.png"}}

Latest commit (Fix --geometry producing wrong results) is incorrect

Compare:

#include <stdio.h>

// rounds n (upwards) to a multiple of f while preserving the sign-bit of n

// The above comment is confusing. Is "upwards" towards 0? If so, the comment
// needs to be changed.
// HOWEVER, I don't think this is what the function is supposed to do!
//
static inline int round_multiple_nosign(int n, int f)
{
    int nn, ns;
    nn = (n >= 0) ? n : -n;
    ns = (n >= 0) ? 1 : -1;
    if (nn % f == 0)
        return n; // n == nn * ns
    else
        return ns * (n + f - (n % f));  // This should be ns * (nn + f - (nn % f));
}

// My version
// afz: away from zero
static inline int round_multiple_afz(int n, unsigned f)
{
    int sign = n < 0 ? -1 : 1;
    n *= sign;
    return sign * (n + f - n % f);
}

int main(void)
{
    printf("%d\n", round_multiple_nosign(-30, 16));
    printf("%d\n", round_multiple_afz(-30, 16));
    return 0;
}

Currently unsuitable for installation

Firstly, there is no make install step to allow for a package manager to drop the files where they should be, but most importantly...

minetestmapper currently reads the colors.txt from the current working directory, as opposed to the program's directory.

This is problematic because an installation is meaningless if a colors.txt must be present in order to use the tool.

Mapper should warn about huge image dimensions

Mint 13 64-bit
Minetest 0.4.10-71...

The mapping was working fine after creating a new world. Then, the maps stopped generating. I think what triggered it was teleporting ~12000x10000 meters to another section of the world which was previously undiscovered.

I tried minetestmapper.py and it generated the map ok. So, I ran gdb but all I got was this, which is probably not helpful. How else to troubleshoot?

(gdb) run
Starting program: /home/test/minetest/util/minetestmapper -i /home/test/minetest/worlds/world/ -o /home/test/minetest-map.png
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program terminated with signal SIGKILL, Killed.
The program no longer exists.
(gdb)

Mapper producing white image for short vertical ranges

I created a building with multiple levels and I'm trying to create images showing the floor plan for each level. But it seems like when I specify the exact level of the floor it often returns a completely white image, e.g. --min-y 44 --max-y 44.

The documentation says nodes won't be drawn below min-y or above max-y so min-y == max-y should work to slice out an exact floor plan at a specific level, but it only works sometimes, and when it does work it usually doesn't even get the correct y level but rather by luck (?) gets an adjacent level.

The actual number of y levels that work appears to be exactly 1 in 16 and is on multiple of 16 which suggests there is some issue with chunking.

I have the same problem when the vertical range is two high, except in this case I get white images in all but 2 of every 16 locations, where the max value modulus 16 is 0 or 1. Likewise if the vertical range is three high all but 3 out of every 16 locations returns a white image, where the max value modulus 16 is 0, 1, or 2 and so forth.

This is problematic because my levels are less than 16 blocks high, making it impossible or difficult to map unless the floor just happens to be at the right range of moduluses.

minetestmapper command and colors.txt

Hello
I´ve got it work at last.
But there are some I think minor restrictions.
first only the colors.txt in the sources works, at least for me
two the colors.txt must be in the same Folder as the executable.
three the executable must be started from the Folder itself and the colors.txt resided in.

It would be fine if I could use other colors.txt Files and If there were a parameter for the colors.txt for example -c --colors that gives the location of a compatible colors.txt.
But at least it should search for a colors.txt File in the actual Folder it is run from, if there is no such file it should search in ~/.minetest and if theres no to it should at last search in /usr/local/share/minetest/. At last it should be working from anywhere in the FS. For example, The executable is in /usr/local/bin, The color.txt resides in /usr/local/share/minetest/ and my working Directory is /home/user. Let the world be in /home/minetest/.minetest/worlds/World, The output should be in ~/Downloads of user then the resulting command minetestmapper -i /home/.minetest/worlds/World -o ~/Downloads/World-Map.png should work.

It would be a charm to fix that regressions.

Thanks,
JPR

cmake redis support?

hi i cant use the switch to enable on minetestmapper the redis db. I use the following command cmake ENABLE_REDIS=1 . which leads to this:

cmake ENABLE_REDIS=1 .
-- libgd library: /usr/lib/x86_64-linux-gnu/libgd.so
-- libgd headers: /usr/include
-- zlib library: /usr/lib/x86_64-linux-gnu/libz.so
-- zlib headers: /usr/include
-- sqlite3 library: /usr/lib/x86_64-linux-gnu/libsqlite3.so
-- sqlite3 headers: /usr/include
-- Configuring done
-- Generating done
-- Build files have been written to ...

this does not build in the redis source to generate it. Maybe i am wrong or it doesnt supported.

Option for fixed image size

I am trying to use some tile html viewer to paint a map of tile images as a map, instead of trying to generate it as one. But the mapper supposedly tries to limit the image size to the actual existing map, and the tiles have different size. E.g. if I specify 1000x1000 tiles, some of them make 32x32 empty images (for the area not generated), some 800x1000, and some even 1008x1008 (not sure why it's bigger then specified geometry). Obviously such images cannot be used to be tiled along as a map.

--max-y is inconsistent

--max-y and --min-y inconsistently switch between blockpos and nodepos.
Fix:

diff --git a/TileGenerator.cpp b/TileGenerator.cpp
index 440bbfd..44ffcba 100644
--- a/TileGenerator.cpp
+++ b/TileGenerator.cpp
@@ -320,7 +320,7 @@ void TileGenerator::loadBlocks()
                        continue;
                }
                // Check that it's between --miny and --maxy
-               if (pos.y < m_yMin * 16 || pos.y > m_yMax * 16) {
+               if (pos.y * 16 < m_yMin || pos.y * 16 > m_yMax) {
                        continue;
                }
                // Adjust minimum and maximum positions to the nearest block

Crash, latest git, always

terminate called after throwing an instance of 'ZlibDecompressor::DecompressError'
is the only thing it tells me.

Minetest mapper and 0.4.15

I just upgraded from 0.4.14 to 0.4.15 and now Minetest Mapper doesn't work. It runs for a while then calls terminate as follows and dumps core:

Warning: The width or height of the image to be created exceeds 4096 pixels! (Dimensions: 6392x9112)
terminate called after throwing an instance of 'ZlibDecompressor::DecompressError'

I'm running Minetest on Ubuntu 16.10. Both 0.4.15 and the mapper prog were downloaded and compiled for this new release. I use "minetest_game" and a few mods.

Is anyone else seeing this?

Conflicting license information?

File LICENCE specifies LGPL 2.1+, but COPYING as well as the metadata for AUTHORS says it's BSD.

Is this dual licensed, or am I missing something?

Mapper producing a white image

Ok, so not sure how to explain this but il do my best.

Basically running the mapper is producing a plain white image almost like the map has never been explored.

At first i thought it may have been a colors.txt issue with my custom file. so i removed it and reverted back to the default but it still happened. after that i removed the mapper entirely, re downloaded and recompiled it, after running it it produced the same white image as before.

I have since tried mireq's minetest-mapper-cpp and it works perfectly but s we know doesn't look as good as this one.

Redis supported ? No map generation

After we managed to compile the mapper with redis support (told us so) we run the mapper with the backend redis switch and waited about over an hour. The result was no map where generated just a an png file of an size about 176kbyte which couldn't be right cuz our map is about 4gigabyte at least. So how may we are able to elaborate this into detail where the issue resides to generate the map out of redis yet.

Tia

Issue with performance

I had performance issues with this version of minetestmapper running on a Virtual Machine that had 6 Gbs of RAM, 4 CPUS and the VM disk running on an SSD benchmarked at 600Mb/s transfer. When I ran minetestmapper, I couldn't find any I/O or CPU bottleneck. However, here's what I found:

NOTE: Most of these benchmarks were made running with est31's leaftest tiling script. This script calls minetestmapper with specific geometry parameters.

Basically I ran some tests and found that the forked minetestmapper from adrido is much faster, at least in my case. https://github.com/adrido/minetest-mapper-cpp

I benchmarked a single 1024,1024 tile (not called by leaftest) between the original minetest/mintestmapper project vs adrido's fork and ended up with these numbers:

Original: 20 seconds
Adrido's: 9 seconds

It's slightly more than 100% faster, but I also found something else that was interesting: When Adrido's fork is used in combination with est31's leaftest script I get even more improvement in speed. I think the reason is due to the way Adrido's handles unexplored portions of map (blank.) It doesn't seem to process them at all and skips through them. A single tile which is sized at around 256 would take approximately 3 ~ 5 seconds to generate with the original mapper. With adrido's mapper, the same took:

0.035s realtime for blank tiles.
0.245s ~ 1.6s realtime for explored tiles with data.

The 1.6s time didn't occur very often, most tiles that had data took in the vicinity of 0.245s ~ 0.5s.

All in all, it took the same VM 30 minutes to generate the map. With the original mapper it took ~4 hours to generate a map half the size.

On a side note that I did run into a problem with the compilation of adrido's version. It seems one of the functions from the experimental 'filesystem' library was not found, this may be an environmental issue as I compiled this on Fedora 29. I realize it has nothing to do with minetest's own minetestmapper repo but it might be good to note.

Build failure: "get_setting" was not declared in this scope, postgresql 9.6.8+

I just attempted to built the latest tagged version of this (2018-03-25) on Fedora 27, with postgresql support enabled. Using postgresql-devel version 9.6.8. I got this error from gcc:

/home/bjr/rpmbuild/BUILD/minetestmapper-20180325/db-postgresql.cpp:17:37: error: 'get_setting' was not declared in this scope
  std::string const connect_string = get_setting("pgsql_connection", ifs);
                                     ^~~~~~~~~~~
/home/bjr/rpmbuild/BUILD/minetestmapper-20180325/db-postgresql.cpp:17:37: note: suggested alternative: 'read_setting'
  std::string const connect_string = get_setting("pgsql_connection", ifs);
                                     ^~~~~~~~~~~
                                     read_setting

If I just replace "get_setting" with "read_setting", as helpfully suggested by the compiler, the build succeeds.

Enabling drawalpha will cause segfault if seabed is not generated

The mapper crashed, running it in gdb i found the problem was in renderMapBlockBottom.
Seeing the drawalpha option there i disabled it and this fixed the problem.
The map showed a world where parts of the seabed had not been generated yet.
As far as i can remember i then generated the seabed and drawalpha then worked.
I suspect the problem is that drawalpha needs a seabed level, if one is not found there should be a fallback value to avoid a crash.
Seabed not generating is common in any mapgen with deep ocean, such as mgv5, or when the player has been flying high over a map.

Water colour?

When I make a map of my world the water surfaces are transparent, so the background colour shows through. This makes it very difficult in areas that are mostly water and not very explored. Is this a usage issue, or is it expected behaviour? The minetest and minetestmapper programs are recent downloads from github, compiled on my Ubuntu 16.10 system.

Minetest-mapper crash using --geometry x:y+w+h

I am using minetest-mapper to make a map of a really big world so I tried to use --geometry option. If I do: $ ./minetestmapper --geometry 0:0+500+500 -i ../ -o test.png
It works, but if I change "0:0" to "-1600:3300" it says: "segmentation fault ('core')"

If I tried to make the full map it works, but it makes a 60MB PNG file, so I want to use --geometry option.

Map is blank above z = 2048 and below z = -2048

mapmt

I set 'static spawnpoint = (0, 128, 2000)' to spawn in a new world at that point, then used 'emergeblocks' to generate a single layer of mapchunks from (-500,-32,1500) to (500,47,2500), a 1000x1000 area centred on my position. Then mapped a larger volume as below:

./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/mt/ -o ~/mapmt.png --bgcolor '#000000' --min-y -512 --max-y 512 --geometry -1000:1000+2000+2000 --drawscale --scalecolor '#ffffff'

The resulting map correctly limits itself to the size of the generated world: 1000x1000 centred on my position, so it is detecting world above y = 2048 but not showing it.

This is a long running bug, at least a year.

error: 'get_setting' was not declared in this scope

When attempting to compile 2018-03-25, I get:

[ 9%] Building CXX object CMakeFiles/minetestmapper.dir/db-postgresql.cpp.o
(REMOVED)/minetestmapper-20180325/db-postgresql.cpp: In constructor 'DBPostgreSQL::DBPostgreSQL(const string&)':
(REMOVED)/minetestmapper-20180325/db-postgresql.cpp:17:72: error: 'get_setting' was not declared in this scope
std::string const connect_string = get_setting("pgsql_connection", ifs);
^
CMakeFiles/minetestmapper.dir/build.make:278: recipe for target 'CMakeFiles/minetestmapper.dir/db-postgresql.cpp.o' failed
make[2]: *** [CMakeFiles/minetestmapper.dir/db-postgresql.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/minetestmapper.dir/all' failed
make[1]: *** [CMakeFiles/minetestmapper.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

The previous version (2017-06-06) works fine.

Mapper fails when any colour command is used

When i run the following command or add any colour option the mapper fails and the error message below appears.

$ ./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/m2/ -o ~/m2map.png --bgcolor #000000

./minetestmapper: option '--bgcolor' requires an argument

minetestmapper only works for small maps

l tried the minetestmapper on my main world.
At first it told me that the backend setting is missing.
So l added --backend sqlite3 after the command. (map.sqlite always means sqlite3 backend, doesn't it?)
After waiting a few seconds and listening to these noises from my pc caused by minetestmapper
it crashed with memory access error as reason.
Then, when l clicked on my firefox window, these noises came again and l needed to wait for a few seconds.
Does minetestmapper work for big worlds if the memory is a bit small?

TileGenerator.cpp:255: off by one error ?

minetestmapper-20180325/TileGenerator.cpp:255]: (error) Width 64 given in format string (no. 1) is larger than destination buffer 'name[64]', use %63s to prevent overflowing it.

Problems with guest accounts on win10

When I unpack the game using an admin account on my computer, then I can play normally, but when I open the same game using a guest or restricted account, the game crashes when I enter a singleplayer world.
When I create a world using a guest account, there is no SQL database created in the worlds folder.
The debug is below:

2018-01-15 14:11:36: WARNING[Main]: BanManager: creating C:\Users\Uczeń13\Documents\rozrywka\minetest-0.4.16-win64\minetest-0.4.16-win64\bin..\worlds\qweqwe\ipban.txt
2018-01-15 14:11:36: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2018-01-15 14:11:36: WARNING[Main]: /!\ You are using old player file backend. This backend is deprecated and will be removed in next release /!
2018-01-15 14:11:36: WARNING[Main]: Switching to SQLite3 or PostgreSQL is advised, please read http://wiki.minetest.net/Database_backends.
2018-01-15 14:11:36: ACTION[Main]: .__ __ __
2018-01-15 14:11:36: ACTION[Main]: _____ || ____ / | ____ ______/ |
2018-01-15 14:11:36: ACTION[Main]: / | |/ _/ __ \ / __ \ / /\
2018-01-15 14:11:36: ACTION[Main]: | Y Y \ | | \ /| | \ / _ \ | |
2018-01-15 14:11:36: ACTION[Main]: |
|
| /
|
| /_
>
| _
>
___ > |
|
2018-01-15 14:11:36: ACTION[Main]: / / / / /
2018-01-15 14:11:36: ACTION[Main]: World at [C:\Users\Uczeń13\Documents\rozrywka\minetest-0.4.16-win64\minetest-0.4.16-win64\bin..\worlds\qweqwe]
2018-01-15 14:11:36: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:55446.
2018-01-15 14:11:38: ERROR[Server]: An unhandled exception occurred: Failed to open SQLite3 database file C:\Users\Uczeń13\Documents\rozrywka\minetest-0.4.16-win64\minetest-0.4.16-win64\bin..\worlds\qweqwe\map.sqlite: unable to open database file
2018-01-15 14:11:38: ERROR[Server]: In thread 8:
2018-01-15 14:11:38: ERROR[Server]: /home/stefan/buildbot/64/minetest/src/server.cpp:73: run: A fatal error occured: Failed to open SQLite3 database file C:\Users\Uczeń13\Documents\rozrywka\minetest-0.4.16-win64\minetest-0.4.16-win64\bin..\worlds\qweqwe\map.sqlite: unable to open database
2018-01-15 14:11:38: ERROR[Server]: ile
2018-01-15 14:11:38: ERROR[Server]: Debug stacks:
2018-01-15 14:11:38: ERROR[Server]: DEBUG STACK FOR THREAD 1:
2018-01-15 14:11:38: ERROR[Server]: #0 main
2018-01-15 14:11:38: ERROR[Server]: DEBUG STACK FOR THREAD 8:
2018-01-15 14:11:38: ERROR[Server]: #0 run
2018-01-15 14:11:38: ERROR[Server]: DEBUG STACK FOR THREAD b:
2018-01-15 14:11:38: ERROR[Server]: #0 run
2018-01-15 14:11:38: ERROR[Server]: DEBUG STACK FOR THREAD c:
2018-01-15 14:11:38: ERROR[Server]: #0 run

When I create a world using the admin account and enter it, then there is no problem, but when I try to enter it when relogging on a guest account I get 2 runtime errors. The debug is below:

2018-01-15 14:26:33: [Main]: Automatically selecting world at [C:\Users\Uczeń13\Documents\rozrywka\minetest-0.4.16-win64\minetest-0.4.16-win64\bin..\worlds\123123]
2018-01-15 14:26:36: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2018-01-15 14:26:36: ACTION[Main]: .__ __ __
2018-01-15 14:26:36: ACTION[Main]: _____ || ____ / | ____ ______/ |
2018-01-15 14:26:36: ACTION[Main]: / | |/ _/ __ \ / __ \ / /\
2018-01-15 14:26:36: ACTION[Main]: | Y Y \ | | \ /| | \ / _ \ | |
2018-01-15 14:26:36: ACTION[Main]: |
|
| /
|
| /_
>
| _
>
___ > |
|
2018-01-15 14:26:36: ACTION[Main]: / / / / /
2018-01-15 14:26:36: ACTION[Main]: World at [C:\Users\Uczeń13\Documents\rozrywka\minetest-0.4.16-win64\minetest-0.4.16-win64\bin..\worlds\123123]
2018-01-15 14:26:36: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:57762.
2018-01-15 14:26:37: ACTION[Server]: singleplayer [127.0.0.1] joins game.
2018-01-15 14:26:37: ACTION[Server]: singleplayer joins game. List of players: singleplayer
2018-01-15 14:26:38: ERROR[Emerge-0]: An unhandled exception occurred: Failed to open SQLite3 database file C:\Users\Uczeń13\Documents\rozrywka\minetest-0.4.16-win64\minetest-0.4.16-win64\bin..\worlds\123123\map.sqlite: unable to open database file
2018-01-15 14:26:38: ERROR[Emerge-0]: In thread d:
2018-01-15 14:26:38: ERROR[Emerge-0]: /home/stefan/buildbot/64/minetest/src/emerge.cpp:293: run: A fatal error occured: Failed to open SQLite3 database file C:\Users\Uczeń13\Documents\rozrywka\minetest-0.4.16-win64\minetest-0.4.16-win64\bin..\worlds\123123\map.sqlite: unable to open database
2018-01-15 14:26:38: ERROR[Emerge-0]: file
2018-01-15 14:26:38: ERROR[Emerge-0]: Debug stacks:
2018-01-15 14:26:38: ERROR[Emerge-0]: DEBUG STACK FOR THREAD 1:
2018-01-15 14:26:38: ERROR[Emerge-0]: #0 main
2018-01-15 14:26:38: ERROR[Emerge-0]: DEBUG STACK FOR THREAD 8:
2018-01-15 14:26:38: ERROR[Emerge-0]: #0 run
2018-01-15 14:26:38: ERROR[Emerge-0]: #1 AsyncRunStep
2018-01-15 14:26:38: ERROR[Emerge-0]: DEBUG STACK FOR THREAD b:
2018-01-15 14:26:38: ERROR[Emerge-0]: #0 run
2018-01-15 14:26:38: ERROR[Emerge-0]: DEBUG STACK FOR THREAD c:
2018-01-15 14:26:38: ERROR[Emerge-0]: #0 run
2018-01-15 14:26:38: ERROR[Emerge-0]: DEBUG STACK FOR THREAD d:
2018-01-15 14:26:38: ERROR[Emerge-0]: #0 run
2018-01-15 14:26:39: ERROR[Server]: An unhandled exception occurred: Failed to prepare query 'BEGIN;': unable to open database file
2018-01-15 14:26:39: ERROR[Server]: In thread 8:
2018-01-15 14:26:39: ERROR[Server]: /home/stefan/buildbot/64/minetest/src/server.cpp:73: run: A fatal error occured: Failed to prepare query 'BEGIN;': unable to open database file
2018-01-15 14:26:39: ERROR[Server]: Debug stacks:
2018-01-15 14:26:39: ERROR[Server]: DEBUG STACK FOR THREAD 1:
2018-01-15 14:26:39: ERROR[Server]: #0 main
2018-01-15 14:26:39: ERROR[Server]: DEBUG STACK FOR THREAD 8:
2018-01-15 14:26:39: ERROR[Server]: #0 run
2018-01-15 14:26:39: ERROR[Server]: DEBUG STACK FOR THREAD b:
2018-01-15 14:26:39: ERROR[Server]: #0 run
2018-01-15 14:26:39: ERROR[Server]: DEBUG STACK FOR THREAD c:
2018-01-15 14:26:39: ERROR[Server]: #0 run
2018-01-15 14:26:39: ERROR[Server]: DEBUG STACK FOR THREAD d:
2018-01-15 14:26:39: ERROR[Server]: #0 run

I want to let my students play minetest so I can create interactive lessons for them at school like in Minecraft Education. If the guest account crashes, I can't do it. Please help...

minetestmapper + postgresql = oom?

So, some time ago my server was using the default SQLite database for the map. minetestmapper was working fine, on a virtual system that then had 2 GB of memory. I even used it to generate huge map images that were about 6224x6224 pixels, unscaled. I still have the successfully generated images.

I soon decided to upgrade the map database to a PostgreSQL database stored separately from the virtual OS itself. Since that time minetestmapper has consistently failed to generate images for even TINY portions of the map, while using huge amounts of server memory (available memory is now 4 GB).

Obviously something is wrong with how one or more of my processes is configured, because Minetest has no issues with the database (it is now 30+ GB in size), and the client can use the sent chunks to generate the image for the minimap. And unless I'm mistaken, I think that PostgreSQL is one of the supported backends for minetestmapper.

I tried compiling a debug version of minetestmapper but was unable to obtain a stacktrace. I'm pretty sure the OOM killer is whacking it.

Here is how I'm trying to execute a test run (which fails shortly after using 51% of server memory):

minetestmapper --geometry "0:0+16+16" -i "/home/minetest/server/world" -o "/home/minetest/test.png"

Here is a snippet of output from top shortly before the crash:

top - 15:39:45 up 8 days, 18:43,  2 users,  load average: 2.61, 2.12, 1.12
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.7 us, 59.9 sy,  0.0 ni,  0.0 id, 38.8 wa,  0.0 hi,  0.2 si,  0.5 st
KiB Mem :  4046376 total,   106972 free,  3247760 used,   691644 buff/cache
KiB Swap:        0 total,        0 free,        0 used.    19892 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
12743 minetest  20   0 2232412 1.959g   1684 S   0.0 50.8   0:07.42 minetestmapper

Here is my world.mt file:

gameid = musttest
backend = postgresql
creative_mode = false
enable_damage = true
pgsql_connection = dbname=survivalworld
player_backend = sqlite3

Please add flag color for non-generated chunks

Having a special flag color for non-generated chunks (such as #010000 with alpha 0 if drawalpha is enable which I had working in my fork of the python version), would be very helpful for map viewer software that use images from minetestmapper, especially map viewers that generate multiple images. This would distinguish non-generated chunks (and edge chunks, but I don't remember whether they are actually stored differently than non-generated chunks in the map format or if I just imagined that) from:

  • pixels generated from air blocks within the given y range (no change to current behavior, if uses the background color with alpha 0 if alpha enabled)
  • pixels generated from nodes where the colors.txt has no corresponding color (which should probably have some kind of innocuous flag color like #898888 and be fully opaque)

Corrupt rendering of maps

I can't pin down why this happens, but I'm getting sort-of-corrupt output from the mapper. Example image (scaled down from the original size):

creative_world-small

I guess that kinda says it all. :-)

Selectively exclude specific nodes

Hello!

I'm using minetestmapper to generate the map for Liberty Land. We wanted to hide nyancats so as to not give away their locations, so @donat-b simply removed the two color definitions from colors.txt. I was thinking that this might be useful as a command-line option, something like

./minetestmapper \
--exclude "default:nyancat" \
--exclude "default:nyancat_rainbow" \
-i world/ -o map.png

Sizecheck abort

I'm using sqlite map database.
This works:

./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/Unnamed62409/ -o ~/map.png
 --bgcolor '#000000' --min-y -100 --max-y 100 --geometry -2000:-2000+4000+4000
 --drawscale --scalecolor '#ffffff'

This does not, despite being an identical size map of 4000x4000, it's just offset in x by 3000.

./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/Unnamed62409/ -o ~/map2.png
 --bgcolor '#000000' --min-y -100 --max-y 100 --geometry 1000:-2000+4000+4000
 --drawscale --scalecolor '#ffffff'
Warning: Falling back to using colors.txt from current directory.
terminate called after throwing an instance of 'std::out_of_range'
  what():  sizecheck x
Aborted (core dumped)

100:-2000+4000+4000 Also fails.

Error while trying to paint a very large map

When trying to generate a map larter than 4096 pixels I get an error:
Warning: The width or height of the image to be created exceeds 4096 pixels! (Dimensions: 61872x61872)
I tried a workaround to scale it down, but the scale must be an integer more than 1, so that does not help either. There is also no setting to split the map to a set of tiles (that would be useful to run a server with OSM-based engine to load the map chunks dynamically).

Here are new node entries for colors.txt

Tested for contrast in environment and distinguishability from other nodes (where reasonably possible).
Stair inner and outer corners need adding for all stair nodes, a copypaste job i might do and paste here later.

# New
default:cave_ice 167 206 247
default:dirt_with_coniferous_litter 135 107 73
default:fern_1 126 173 74
default:fern_2 126 173 74
default:fern_3 126 173 74
default:marram_grass_1 84 138 91
default:marram_grass_2 84 138 91
default:marram_grass_3 84 138 91
default:sand_with_kelp 133 132 44
fireflies:firefly 255 234 0
fireflies:firefly_bottle 255 234 0
flowers:chrysanthemum_green 194 218 44
flowers:tulip_black 59 17 37

newcolors2

^ With water removed to see kelp

Odd entries for xpanes in colors.txt

# xpanes
xpanes:bar 194 194 227 64 16
xpanes:bar_flat 194 194 227 64 16
xpanes:pane 194 194 227 64 16
xpanes:pane_flat 194 194 227 64 16

5 values and bars identical to panes.

Unable to build with postgresql support.

Building MT with postgresql requires a bit of fiddling. Passing the same flags to mtmapper looks promising but fails quickly on make.

leeh@s103139:~/minetestmapper$ cmake . -DENABLE_POSTGRESQL=1 -DPOSTGRESQL_INCLUDE_DIR=/usr/include/postgresql/ -DPOSTGRESQL_LIBRARY=/usr/lib/x86_64-linux-gnu/libpq.so.5.7 -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql
-- libgd library: /usr/lib/x86_64-linux-gnu/libgd.so
-- libgd headers: /usr/include
-- zlib library: /usr/lib/x86_64-linux-gnu/libz.so
-- zlib headers: /usr/include
-- sqlite3 library: /usr/lib/x86_64-linux-gnu/libsqlite3.so
-- sqlite3 headers: /usr/include
-- PostgreSQL backend enabled
-- PostgreSQL includes: /usr/include/postgresql
-- Configuring done
-- Generating done
-- Build files have been written to: /home/leeh/minetestmapper
leeh@s103139:~/minetestmapper$ make
[ 11%] Building CXX object CMakeFiles/minetestmapper.dir/db-postgresql.cpp.o
/home/leeh/minetestmapper/db-postgresql.cpp: In member function ‘int DBPostgreSQL::pg_to_int(PGresult*, int, int)’:
/home/leeh/minetestmapper/db-postgresql.cpp:151:39: error: ‘atoi’ was not declared in this scope
  return atoi(PQgetvalue(res, row, col));
                                       ^
/home/leeh/minetestmapper/db-postgresql.cpp:152:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
CMakeFiles/minetestmapper.dir/build.make:238: recipe for target 'CMakeFiles/minetestmapper.dir/db-postgresql.cpp.o' failed
make[2]: *** [CMakeFiles/minetestmapper.dir/db-postgresql.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/minetestmapper.dir/all' failed
make[1]: *** [CMakeFiles/minetestmapper.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

sqlite3 player backend not supported

the command -drawplayers doesnt paint the player position on the map anymore (use minetest 0.4.16 stable). Could it be that I already migrated the player data to the sqlite3 database?

README unclear on geometry

--geometry -800:-800+1600+1600
First i assumed a typo because i was assuming this to be minp maxp, the colon seemed wrongly placed. Then i stumbled across the error message in terminal:
--geometry x:y+w+h
Makes it clearer, but some people wonder if x:y is the centre.
'-800:-800+1600+1600' seems to imply x:y is the minp and i am now assuming this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.