jason-green-io / papyri

Minecraft map item data mapping tool using Leaflet
MIT License
62 stars 10 forks source link

prioritization of overlapping maps #34

Open cyanbsw opened 3 years ago

cyanbsw commented 3 years ago

The readme says:

"Papyri will prioritize rendering so that maps with higher detail are rendered on top of maps of lower detail and maps at the same detail are rendered in order from oldest updated to newest updated"

As I can see, that's exactly how it works. But in my opinion that's not the best way to handle it.

I'm exploring wide areas with maps scaled 1:8 (zoom level 3). To do so I have to create a map with zoom level 0 first, then zooming out, which creates additional maps. You don't have to use the intermediate zoom level maps (e.g. leaving them empty) but the first map has to be used in order to be created in the first place.

This ends up with 4 maps, a 1:1 map which is partialy filled, two empty 1:2 / 1:4 maps and the desired 1:8 map which is the only one I'm using to explore. The first 3 got used up while zooming out at the cartography table. With this result I'm unable to reflect terrain changes by using the 1:8 map in the area the 1:1 map has allready covered. I could make a copy of the 1:1 map but then I had to keep two sets of maps up to date.

I think it would be better to prioritize up-to-date maps over higher detailed maps or at least implement an option to choose which way map data should be chosen.

edit: typo

MnTronslien commented 3 years ago

The way I have been handling this is just some manual cleanup - but I can do this because I am the one hosting the server with papyri. If you go into "[world_name] > Data", you can see all the maps that have been created. By using the map mode overlay in papyrus you can locate the ones you want to delete.

jason-green-io commented 3 years ago

@cyanbsw has a good point, and it's something I knew would come up eventually after I made that design choice once someone had that use case. Would a command line option to tell papyri how to order the rendering work?

Edit:

Maybe numbered modes with set orders like "id, update time, zoom level" and "id, zoom level, update time" etc..

MnTronslien commented 3 years ago

I think the numbered modes is best, yeah. Because at this point you are down to preferences and different use cases. In our use case we occasionally have new players joining that isn't familiar with how papyri work and so they will just create new maps, even at a large scale. It would be a bad thing if that then obscured the higher-res map that other people in those regions have of their bases.

jason-green-io commented 3 years ago

I just added this in dev, could you check and see if it does what you'd like?

cyanbsw commented 3 years ago

Works like a charm and solves my problem. Not sure if sorting by anything besides zoom level and update time makes sense for anybody else, but I'm fine. Thanks.

AndrewKvalheim commented 3 years ago

zooming out, which creates additional maps

My take on this has been that ideally the additional maps should be ignored since they’re effectively no longer part of the game. I wish the game would just garbage collect them.

Unfortunately identifying them requires scanning the whole world for references. I tried it but it’s a lot of overhead for something that shouldn’t have been necessary in the first place. Not sure what the right way forward is but I suspect it might involve a data cleaning task separate from tile rendering.