acidflow-noita / noitamap

Blazingly-fast superzoom map for Noita
https://map.runfast.stream
GNU General Public License v3.0
12 stars 4 forks source link

Add overlays and points of interests #5

Open WUOTE opened 3 months ago

WUOTE commented 3 months ago

We want to provide functionality similar to the old easyzoom maps'.

In order to do that, we need to implement overlays, the easiest way to do this is to partially reuse the easyzoom's overlays by extracting useful info, then readjusting them to the new maps' sizes found in the dzi files for the maps: https://github.com/acidflow-noita/noitamap/blob/00df67642be2ec6a1cdd6de53077da639659c450/public/js/script.js#L7

{"Image":{"xmlns":"http://schemas.microsoft.com/deepzoom/2008","Format":"webp","Overlap":"2","TileSize":"512","Size":{"Width":"51200","Height":"73728"},"TopLeft":{"X":"-25600","Y":"-31744"}}}

Easyzoom overlays are stored like this.

JeanChristopheM commented 1 month ago

I have been looking into this but can't figure out the math to convert easyzoom's data to your map's coordinates. Do you have any pointers to help me figure this out ? Figuring out new coordinates seems dreadful if it can be avoided for most POI

WUOTE commented 1 month ago

I have been looking into this but can't figure out the math to convert easyzoom's data to your map's coordinates. Do you have any pointers to help me figure this out ? Figuring out new coordinates seems dreadful if it can be avoided for most POI

Thank you for looking at this issue. @Dadido3 had a similar idea, and we can try converting coords, but it seems that we would be better off recreating new overlays from scratch:

  1. No spam / bot messages compared to the old easyzoom map Letaali made.
  2. Ability to separate POIs to different layers (similar to how I started with the Bosses overlay).
  3. The old map and the new map's dimentions might not be the same since Letaali used to capture the "skinnier" version.

I haven't found a better overlay mechanism than the one currently being used, what can be done is shown on D3's implementation of the map.

If you choose to test coords conversion first, this helper plugin should help:

  1. Demo
  2. Repo
JeanChristopheM commented 1 month ago

Hey cheers for the quick reply. It seems I misunderstood the scope of this issue. I thought you just wanted to add more data to the current overlayText variable and figured it was something easy enough I could contribute to.

I have created a pull request having my idea in mind but feel free to discard it if you want as I clearly misread your intentions.

I might look into what you actually wanted but I am afraid it looks slightly out of my knowledge.

UPDATE : I updated the PR to reflect more what I think you were hoping for. Thanks for your time !

Here's a sneak peak : image