Page 1 of 1

Minetestmapper (a mapping tool)

PostPosted: Mon May 30, 2011 09:18
by celeron55
There now exists a simple mcmap/cartographer/minemap/pixelmap-like tool for Minetest! It's been made by j0gge and it is a very early version, but it is usable.

Here is a package of the initial version with some modifications made by me:
http://celeron.55.lt/~celeron55/random/2011-05/minetestmapper.tar.gz

The map at celeron.55.lt:
http://celeron.55.lt/~celeron55/random/2011-05/uloste4.png

If you're not familiar with modifying and running python scripts, don't bother to try at this time.

Watch out for updates in this thread!

PostPosted: Mon May 30, 2011 20:10
by Fisherman
Gwaur made some translations. http://konata.fi/minetest-c55/minetestmapper_eng.tar

Sorry for hurting your feelings, celeron

PostPosted: Sat Jun 04, 2011 10:29
by celeron55
J0gge released a new version and I modified it slightly again:

http://celeron.55.lt/~celeron55/minetest/packages/minetestmapper/minetestmapper-2011-06-04.tar.gz

Glance through the command line parameters in the script before using.

PostPosted: Sat Jun 04, 2011 11:38
by Fisherman
Does J0gge have any contact information?

I made some minor optimizations, it's about 7% faster or so, and some other changes. I have considered porting it to C, but I need to know better what the python script does before I start.

https://github.com/reynir/minetest-delta

PostPosted: Sat Aug 25, 2012 15:10
by mireq
I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.

Code: Select all
./minetest_mapper ...  6,96s user 0,16s system 99% cpu 7,181 total
python minetestmapper.py ... 531,58s user 1,66s system 99% cpu 8:55,13 total


Source code is on github (https://github.com/mireq/minetest-mapper-cpp).

Rquired dependencies are:
  • libgd
  • boost
  • sqlite3

Commandline arguments are that same as used in minetestmapper.py. Input directory (-i) must end with /.

PostPosted: Sun Aug 26, 2012 01:24
by leo_rockway
mireq wrote:I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.

Code: Select all
./minetest_mapper ...  6,96s user 0,16s system 99% cpu 7,181 total
python minetestmapper.py ... 531,58s user 1,66s system 99% cpu 8:55,13 total


Source code is on github (https://github.com/mireq/minetest-mapper-cpp).

Rquired dependencies are:
  • libgd
  • boost
  • sqlite3

Commandline arguments are that same as used in minetestmapper.py. Input directory (-i) must end with /.



_Literally_ 50 times faster:
minetestmapper.py -i ~/.minetest/worlds/Leo/ -o map.png 54.59s user 0.23s system 96% cpu 56.837 total
minetest_mapper -i ~/.minetest/worlds/Leo/ -o mapa.png 1.19s user 0.01s system 99% cpu 1.201 total

Great job!

PostPosted: Sun Aug 26, 2012 02:35
by Qaddosh
mireq wrote:I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.

Code: Select all
./minetest_mapper ...  6,96s user 0,16s system 99% cpu 7,181 total
python minetestmapper.py ... 531,58s user 1,66s system 99% cpu 8:55,13 total


Source code is on github (https://github.com/mireq/minetest-mapper-cpp).

Rquired dependencies are:
  • libgd
  • boost
  • sqlite3

Commandline arguments are that same as used in minetestmapper.py. Input directory (-i) must end with /.



Cmake runs fine. Make completes cleanly. But, when I try to run, I get:

Code: Select all
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create
Aborted (core dumped)

PostPosted: Sun Aug 26, 2012 07:04
by VanessaE
Since it's in C++ now, what is the possibility of integrating this into the game, i.e. as some kind of map viewer one can call up with a keypress?

(yes I know minecraft has a similar function, but this would be immensely useful on well-developed servers)

PostPosted: Sun Aug 26, 2012 17:52
by mireq
Qaddosh: This is a strange error. Could you please upload map.sqlite file?

VanessaE: No. This application requires a local map.sqlite file. To view a map would be better to use the orthographic view in current engine.

PostPosted: Sun Aug 26, 2012 22:03
by Phitherek_
I' ve got the same error as Qaddosh.
Minetest version 0.4.2-rc1 (latest from git).
map.sqlite here: http://www.mediafire.com/file/czv7328dv5vvcve/map.sqlite

PostPosted: Mon Aug 27, 2012 02:11
by cornernote
VanessaE wrote:Since it's in C++ now, what is the possibility of integrating this into the game, i.e. as some kind of map viewer one can call up with a keypress?


+1 for that


anyone got a compiled win32 binary to share?

PostPosted: Mon Aug 27, 2012 05:49
by mireq
@Qaddosh, @Phitherek_: fixed

PostPosted: Tue Aug 28, 2012 09:34
by mireq
@cornernote: Windows binary is here: https://github.com/mireq/minetest-mapper-cpp/downloads

PostPosted: Tue Aug 28, 2012 09:51
by Qaddosh
mireq wrote:@Qaddosh, @Phitherek_: fixed


It works now. And it's really fast. Thank you!

PostPosted: Tue Aug 28, 2012 20:34
by celeron55
mireq wrote:I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.

Code: Select all
./minetest_mapper ...  6,96s user 0,16s system 99% cpu 7,181 total
python minetestmapper.py ... 531,58s user 1,66s system 99% cpu 8:55,13 total


Source code is on github (https://github.com/mireq/minetest-mapper-cpp).

Rquired dependencies are:
  • libgd
  • boost
  • sqlite3

Commandline arguments are that same as used in minetestmapper.py. Input directory (-i) must end with /.


This is officially full of awesome.

Should've been posted as a new topic on "Minetest-related projects" though. mireq: You could re-post there to get a bit more visibility.

PostPosted: Sun Jan 27, 2013 04:26
by 0gb.us
mireq wrote:I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.


/home/us_0gb/.minetest/minetest-mapper-cpp-master/TileGenerator.cpp:13:22: fatal error: gdfontmb.h: No such file or directory


I get an error when I try to compile it. What is gdfontmb.h, and where do I get it?

Thanks!

PostPosted: Sun Apr 21, 2013 20:18
by khonkhortisan
0gb.us wrote:
mireq wrote:I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.


/home/us_0gb/.minetest/minetest-mapper-cpp-master/TileGenerator.cpp:13:22: fatal error: gdfontmb.h: No such file or directory


I get an error when I try to compile it. What is gdfontmb.h, and where do I get it?

Thanks!

It's in libwmf-devel, but gd-devel is what I needed.

PostPosted: Fri Aug 30, 2013 23:53
by leetelate
gdfontmb.h is in here --> https://github.com/zer0x304/gd-2.0.35 - download then extract it seemed to work and fixed the make error

PostPosted: Sun Sep 01, 2013 19:01
by sfan5
leetelate wrote:gdfontmb.h is in here --> https://github.com/zer0x304/gd-2.0.35 - download then extract it seemed to work and fixed the make error

Just downloading the header won't fix it, you actually need to install libgd and libgd headers

PostPosted: Fri Nov 08, 2013 04:41
by Silent-Hunter
So is this an item in game that you look at, or is the map an external image file created by the program?

PostPosted: Fri Nov 08, 2013 04:45
by VanessaE
It's an external image file that you can view with e.g. Gthumb, or upload onto a webpage (e.g. here).

PostPosted: Fri Dec 06, 2013 20:01
by Erthome
@Vanessa...I realize that this is an older thread, but it occurs to me that what you asked for still doesn't appear to be available yet, and it is definitely something I'd like to see...

Would it not be feasible to have a two stage solution here...the utility is setup to be run either automatically or on demand my an admin/moderator which then places region images in a repository directory inside the minetest directory tree, meanwhile, a form-based mod offers an in-game scrollable pop-up view that simply displays the image that encompasses the players current position?

All sorts of other things might be incorporated such as tying access to this map to the wielding of a tool=map, or limiting the extended display areas to those that one has already been or that...but I am too unfamiliar with the code to know how feasible such additional aspects would be. I can imagine that one could get very elaborate and incorporate the idea of purported and alleged areas or even sketchy memory after a time from ones last visit, but I am pretty sure those would be major scope expansions LOL

BUT, the basic concept seems really straight forward and useful...LOL...if nothing else I'd like to see a full unlimited map as an offering on that unified Admin/Moderator tool rack I've started wishing for ;-)

PostPosted: Sat Dec 07, 2013 18:06
by Sokomine
I'm afraid the main obstacle is that the protocol does not allow to send media content (like images) after the initial transfer of the media data upon connection. And that transfer is already so slow we can't afford to stuff any large pictures in. And those overview images of a server tend to be pretty large. More than 20 MB are common for large multiplayer servers. Transfering such an image with MT might easily take 20-30 minutes.

There is something that might be doable with a mod: Manually create a small(!) overview image of the server that does not show each block but instead shows points of intrest (large towns or other structures). The mod could then show the image to the player and blend in the player's location, spawn and home. Might be helpful for some actual large-scale orientation. Like a world map.

Another approach would be to do the map client-side. That would require changes to the engine itshelf. And it would only show a map of what the client has downloaded from the server in that very session - you won't be able to see very far at first. The advantage is that there would be no problem with heights as the client does know where the player is and could create a map of that level based on the sourrounding mapblocks. Exploring caves and houses might get far easier that way. Provided the area displayed is not too lage (perhaps ~160 nodes north/south/east/west and ~32 up/down), that ought to be well manageable for the computer running the client. Each block ought to be displayed as at least 2 pixel to provide a better overview.

In pseudocode, it might be that way:
- determine position of the player
- calculate eye height (y+2)
- get all map blocks at the same height level as the players eye level; the blocks have to be close enough (<= 10 mapblocks/160 nodes distance on x/z)
- for each x/z node coordinate:
* If there's a block that's not air at eye height at that x/z coordinate: Bingo, found our block.
* Else decrease the y component until we hit something that is not air. If the bottom of the mapblock is reached, either search the mapblock below or display a white spot.

The pseudo algorithm might be too simple as it would allow to scan for ores extremly easily. Perhaps nodes that are sourrounded on all sides by non-transparent ones would have to be displayed as black spots.

PostPosted: Sat Dec 07, 2013 22:56
by Erthome
Seems to me that the inability to serve images from the game server should not be an obstacle to serving links that the client could then use to pull content from a web server and display in-game...sorry I know I am a "Johnny come lately" here and maybe that has all been explored and dismissed for some reason, BUT it would open up a TON of possibilities for robust content sharing mods.

Like say,

- robust readable personalized signs
- in-game dynamic texture packs (localized to individual areas even?)
- personalized paintings
- readable books
- highly stylized semi-static content (like hand generated treasure maps, formulas, recipes, role play message, displayable award certificates, and on and on...)


-- or is this not so much a technical problem as it is a legal liability one in someone's eyes?

Anyone wanna bring me and other newcomers up to speed or point us to the old discussions?

PostPosted: Sat Dec 07, 2013 23:13
by Erthome
It just occurred to me that what I am suggesting here is similar to the recorder discussion elsewhere in that what is appearing is a need for client side extensions/plugins and some basic services in the server build to support and keep that genre of mod consistent and high quality.

Once again, I'm guessing that this ground has been heavily traveled in discussions elsewhere before my recent "awakening" to the game LOL