Page 5 of 5

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Tue Apr 29, 2014 11:52
by Morn76
dgm5555 wrote: I have no idea what gsmapper does, as the post starts with a bunch of people flaming each other, and doesn't contain any screenshots.
The screenshot is hidden in the "spoiler" tag of the first post:.viewtopic.php?p=128514 I don't think gsmapper draws buildings either.

Wouldn't it be possible to use OpenGL to render an overhead, far away shot for the map: OpenGL render to texture and then paste it in the top right corner. Of course this would only show map blocks that are loaded in, but at least buildings and proper lighting would be there. Then again maybe this is impossible because we are using OpenGL via Irrlicht, who knows. And of course this approach might run into problems when the camera goes above the cloud layer.

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Tue Apr 29, 2014 22:53
by dgm5555
I made a quick mod for displaying a minetest mapper png (basically by copying the MAPP code then deleting bits), which is why I've posted briefly here to say thanks for the idea. My proper post (with a zip of the mod) is at viewtopic.php?f=9&t=9219
Cheers David
An example (with optional purple underground caves) is:-
Image

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Wed Apr 30, 2014 22:13
by dgm5555
This may have been fixed by now, but the copy I downloaded last night from the github has an error which means the arrow points incorrectly for the 180-270 degree quadrant. The code should read

Code: Select all

           elseif yaw < 180 then
              rotate = 180
           elseif yaw < 270 then    -- NOT 170 as is currently
              rotate = 270                 -- NOT 170 as is currently

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Thu May 01, 2014 05:25
by 4aiman
@dgm555:
Where did you get your version?
The mod wasn't updated for a year and there's no such problem:
https://github.com/4aiman/mapp/blob/master/init.lua ;)

Minetest mapper has one little problem, AFAIK: it doesn't work out-of-box. Or were there improvements?

Also, I've been able to read the map with LVM (to find a good spawn position, if anyone's interested) and it's possible to use it to create a map even in realtime (with kaeza's "yield" approach used). I have no time for this ATM, but for an old-good-MC-like maps this may be the answer. Anyone care to rewrite this using LVM?

Edit: python mapper is not a sibling of this mod and never was. This was made public a whole year and some months ago and hasn't been updated ever since. As for speed... just try to imagine that at the time of "release" lua in Minetest was at least x40 slower in some cases! Anyway, this was just a concept to help myself and people.

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Thu May 01, 2014 13:38
by dgm5555
Strangely, I've deleted the mod and re-downloaded it and it's now as should be. The gremlins must have been having fun (or I managed to somehow replace text without realising it)...
4aiman wrote:Minetest mapper has one little problem, AFAIK: it doesn't work out-of-box. Or were there improvements?
Generation of the map worked out of the box on my system (Ubuntu 14.04), but I (think) I had to install numpy to use the latest fork of the original (the numpy-ised version last updated 6 weeks ago). However both are command-line python scripts (tho I'm wondering about using shell.run to integrate it into a mod)
4aiman wrote:python mapper is not a sibling of this mod and never was...
I take it python mapper = Minetestmapper. I didn't mean to imply they were linked originally except by me creating a mash with the mapp code. Don't get me wrong, I think the mapp concept is awesome, and I agree that Minetestmapper is certainly not for everyone, and mapp is a much more user-friendly solution. Essentially I've just pinched the mapp code (thus my thanks/acknowledgement) and converted it to display a .png (which could be any .png, but I happen to use a map). Also, unlike mapp's almost instantaneous display, the latest version of minetestmapper-numpy.py still takes 10secs to generate a map for an generated world of 1500x1500, so much too slow to be created live, but does give a much better overview of the "continent", whereas on my system maap shows a much smaller area than I can see, and in less detail than I can see it, so I didn't find it to be so useful for getting myself unlost (which is what I needed if I didn't want to use teleport all the time).

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Sat May 03, 2014 14:52
by 4aiman
What can I say... I'm glad this was of any help to someone :)
dgm5555 wrote:worked out of the box on my system (Ubuntu 14.04)
But what about Windows? Maybe Minetest should bundle local python? Just like Blender does. At least if there would be an installer it could be made into an optional stage.

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Sun May 04, 2014 00:40
by Excalibur Zero
I put together a video on this mod here:

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Sun May 04, 2014 20:54
by philipbenr
4aiman wrote:What can I say... I'm glad this was of any help to someone :)
dgm5555 wrote:worked out of the box on my system (Ubuntu 14.04)
But what about Windows? Maybe Minetest should bundle local python? Just like Blender does. At least if there would be an installer it could be made into an optional stage.
I second that.

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Tue May 06, 2014 13:38
by dgm5555
4aiman wrote:Maybe Minetest should bundle local python?
I agree would probably be helpful for some mods, but the problem is also what libraries to include. PIL would be an obvious one, but numpy just for a map mod that most people don't use? or tkinter to enable gitsync? etc...
Would it be possible to have a lua script to install them, then the only thing to update is links to the executables for installing on windows?

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Tue May 06, 2014 13:43
by dgm5555
@4aiman, could you please explain the .. ".png^[transformFYR".. rotate .. bit of your code. I want to be able to zoom in and move around to view different portions of the png for mapit, and I think this is likely to be the secret, but I can't find any documentation of what you are doing? Thanks, David

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Thu May 08, 2014 04:29
by spootonium
[transformFYR90 is a texture transform function that flips a texture element upside-down and the rotates it 90 degrees. It's in the dev wiki. I suspect the part of the code you're thinking of is where the little, green, direction cursor is added.
This mod generates its map on-demand, centered on the player's location. You can't "pan" the map without re-generating it. You might be able simulate map-scrolling by passing the mapping function a shifted (relative to the player) centre location and forcing a re-draw. I'm not sure exactly how you'd go about zooming the map, but it would involve changing the default 16x16 mapping area.
Hope that helps.

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Mon May 12, 2014 05:56
by 4aiman
Mapp couldn't be helped. the only way to speed up a little is to use get_ground_level(pos) but that didn't improve things for me. Besides it goes up, not down. Problem is in the formspec generation. Otherwise the cycle with get_node() is quite fast. Still didn't try to use LVM to read nodes. That should be faster than get_node().

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Mon May 12, 2014 07:03
by dgm5555
Just wondering if it would be too challenging to use MAPP when not playing minetest to generate an offline map of the entire world, then reload it when needed (like mapit but without the dependency on python). This shouldn't be too difficult (just very slow). Are there any functions which provide the bounds of the world?

Re: [Mod] MAPP - map for Minetest - optimized! [0.2.4]

Posted: Wed Jun 18, 2014 15:48
by Inocudom
viewtopic.php?f=7&t=8489
The community seems to need a reason to care about gsmapper, so I am wondering if it would help out the mapp mod any if it was added to Minetest.