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

User avatar
Morn76
Member
Posts: 659
Joined: Sun Feb 16, 2014 19:45

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

by Morn76 » Post

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.

User avatar
dgm5555
Member
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Post

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

User avatar
dgm5555
Member
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Post

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

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

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

by 4aiman » Post

@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.

User avatar
dgm5555
Member
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Post

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).

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

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

by 4aiman » Post

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.

User avatar
Excalibur Zero
Member
Posts: 142
Joined: Tue Apr 02, 2013 19:45
GitHub: ExcaliburZero
Location: United States
Contact:

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

by Excalibur Zero » Post

I put together a video on this mod here:

User avatar
philipbenr
Member
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

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

by philipbenr » Post

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.

User avatar
dgm5555
Member
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Post

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?

User avatar
dgm5555
Member
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Post

@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

User avatar
spootonium
Member
Posts: 94
Joined: Fri May 02, 2014 01:38
Location: Down the mine.

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

by spootonium » Post

[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.
I write code. Sometimes, it even works.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

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

by 4aiman » Post

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().

User avatar
dgm5555
Member
Posts: 245
Joined: Tue Apr 08, 2014 19:45

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

by dgm5555 » Post

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?

User avatar
Inocudom
Member
Posts: 3085
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

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

by Inocudom » Post

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.
You can now find my videos at BitChute: https://www.bitchute.com/channel/some_cheeky_jinuskian/

Post Reply

Who is online

Users browsing this forum: MoNTE48 and 9 guests