Minetestmapper (a mapping tool)

celeron55
Member
 
Posts: 430
Joined: Tue Apr 19, 2011 10:10

Minetestmapper (a mapping tool)

by celeron55 » Mon May 30, 2011 09:18

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!
 

Fisherman
Member
 
Posts: 10
Joined: Fri Apr 22, 2011 14:13

by Fisherman » Mon May 30, 2011 20:10

Gwaur made some translations. http://konata.fi/minetest-c55/minetestmapper_eng.tar

Sorry for hurting your feelings, celeron
 

celeron55
Member
 
Posts: 430
Joined: Tue Apr 19, 2011 10:10

by celeron55 » Sat Jun 04, 2011 10:29

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.
 

Fisherman
Member
 
Posts: 10
Joined: Fri Apr 22, 2011 14:13

by Fisherman » Sat Jun 04, 2011 11:38

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
 

User avatar
mireq
New member
 
Posts: 7
Joined: Sat Aug 25, 2012 14:53

by mireq » Sat Aug 25, 2012 15:10

I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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 /.
 

leo_rockway
Member
 
Posts: 131
Joined: Tue Jul 31, 2012 20:37

by leo_rockway » Sun Aug 26, 2012 01:24

mireq wrote:I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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!
 

User avatar
Qaddosh
Member
 
Posts: 30
Joined: Mon Jul 16, 2012 19:08

by Qaddosh » Sun Aug 26, 2012 02:35

mireq wrote:I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create
Aborted (core dumped)
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Aug 26, 2012 07:04

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)
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
mireq
New member
 
Posts: 7
Joined: Sat Aug 25, 2012 14:53

by mireq » Sun Aug 26, 2012 17:52

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.
 

User avatar
Phitherek_
Member
 
Posts: 112
Joined: Thu Aug 23, 2012 16:17

by Phitherek_ » Sun Aug 26, 2012 22:03

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
---
Posted by Phitherek_
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Aug 27, 2012 02:11

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?
 

User avatar
mireq
New member
 
Posts: 7
Joined: Sat Aug 25, 2012 14:53

by mireq » Mon Aug 27, 2012 05:49

@Qaddosh, @Phitherek_: fixed
 

User avatar
mireq
New member
 
Posts: 7
Joined: Sat Aug 25, 2012 14:53

by mireq » Tue Aug 28, 2012 09:34

@cornernote: Windows binary is here: https://github.com/mireq/minetest-mapper-cpp/downloads
 

User avatar
Qaddosh
Member
 
Posts: 30
Joined: Mon Jul 16, 2012 19:08

by Qaddosh » Tue Aug 28, 2012 09:51

mireq wrote:@Qaddosh, @Phitherek_: fixed


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

celeron55
Member
 
Posts: 430
Joined: Tue Apr 19, 2011 10:10

by celeron55 » Tue Aug 28, 2012 20:34

mireq wrote:I rewrote the minetestmapper.py tool to C++. It is at least 50 times faster than original.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.
 

User avatar
0gb.us
Member
 
Posts: 841
Joined: Sun Sep 16, 2012 01:55

by 0gb.us » Sun Jan 27, 2013 04:26

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!
Last edited by 0gb.us on Sun Jan 27, 2013 04:27, edited 1 time in total.
 

User avatar
khonkhortisan
Member
 
Posts: 30
Joined: Fri Jun 29, 2012 17:30

by khonkhortisan » Sun Apr 21, 2013 20:18

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.
 

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Fri Aug 30, 2013 23:53

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
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun Sep 01, 2013 19:01

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
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Silent-Hunter
Member
 
Posts: 30
Joined: Wed Nov 06, 2013 20:06

by Silent-Hunter » Fri Nov 08, 2013 04:41

So is this an item in game that you look at, or is the map an external image file created by the program?
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Nov 08, 2013 04:45

It's an external image file that you can view with e.g. Gthumb, or upload onto a webpage (e.g. here).
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Erthome
Member
 
Posts: 94
Joined: Thu May 30, 2013 01:03

by Erthome » Fri Dec 06, 2013 20:01

@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 ;-)
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Sat Dec 07, 2013 18:06

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.
A list of my mods can be found here.
 

Erthome
Member
 
Posts: 94
Joined: Thu May 30, 2013 01:03

by Erthome » Sat Dec 07, 2013 22:56

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?
Last edited by Erthome on Sat Dec 07, 2013 23:09, edited 1 time in total.
 

Erthome
Member
 
Posts: 94
Joined: Thu May 30, 2013 01:03

by Erthome » Sat Dec 07, 2013 23:13

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
Last edited by Erthome on Sat Dec 07, 2013 23:14, edited 1 time in total.
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 13 guests

cron