Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarf Fortress Map Archive HTML5 Alpha  (Read 2438 times)

Markavian

  • Bay Watcher
  • DF Map Archive Admin
    • View Profile
    • DF Map Archive
Dwarf Fortress Map Archive HTML5 Alpha
« on: April 16, 2022, 12:32:39 pm »

2022-04-16

Added support for HTML5 map viewer in alpha mode (α). You can now toggle between Flash / HTML on a per-map basis. This mode has been introduced to help diagnose issues with the new map viewer - which can now dynamically load any map or point of interest in the map archive database - which is revealing lots of edge cases. Currently the HTML5 map viewer supports top down rendering of the more recent map types.

Look for these links at the top of map pages:

  • Flash Viewer (Ω)
  • HTML5 Viewer (α)

Example: https://mkv25.net/dfma/poi-24704-burrowworkshops?viewer=html5

You should see this at the top of each page

The HTML5 map viewer is currently in Alpha mode - I'm actively trying to develop new functionality.

There should be many very obvious problems with the viewer; please check the Issues page to notify or comment on the most egregious problems to help me prioritise. The most common will be Loading... with an error in the browser developer tools console. e.g. RangeError: Offset is outside the bounds of the DataView. Feel free to report a problem with a link to the problematic map or point of interest.

Preview
Spoiler (click to show/hide)

Any questions, comments... ask away. Let me know what's important to you.
Logged

Salmeuk

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress Map Archive HTML5 Alpha
« Reply #1 on: April 16, 2022, 03:15:18 pm »

yesssssssssssssssss

This is awesome. I can finally look at all my old maps again. all the way back to 2008!

I cannot thank you enough for not only maintaining this archive, but continuing to improve it.

One thing I noticed, when opening a new PoI from the sidebar menu, you must reselect HTML5 for the map to appear. Wouldn't it make sense to save this choice for all future re-loads?

Also, I have noticed some PoIs that are broken or appear to direct the viewer to the wrong tile altogether. For instance, this map: https://mkv25.net/dfma/poi-33534-thelibrary?viewer=html5

Looking forward to future updates. Maybe post on the subreddit once you recreate the basic navigation functionality of yore
Logged

Eniteris

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress Map Archive HTML5 Alpha
« Reply #2 on: April 16, 2022, 04:01:28 pm »

This is much appreciated, thanks you delicious friend!

Bug report: Pressing + or - seems to set X/Y to NaN/NaN, forcing a refresh.
Logged

Markavian

  • Bay Watcher
  • DF Map Archive Admin
    • View Profile
    • DF Map Archive
Re: Dwarf Fortress Map Archive HTML5 Alpha
« Reply #3 on: April 17, 2022, 03:11:52 am »

yesssssssssssssssss

This is awesome. I can finally look at all my old maps again. all the way back to 2008!

I cannot thank you enough for not only maintaining this archive, but continuing to improve it.

One thing I noticed, when opening a new PoI from the sidebar menu, you must reselect HTML5 for the map to appear. Wouldn't it make sense to save this choice for all future re-loads?

Also, I have noticed some PoIs that are broken or appear to direct the viewer to the wrong tile altogether. For instance, this map: https://mkv25.net/dfma/poi-33534-thelibrary?viewer=html5

Looking forward to future updates. Maybe post on the subreddit once you recreate the basic navigation functionality of yore

Hey Salmeuk, re above:
  • Yayerations!
  • You're welcome - sorry for not making more time for the archive in the past few years - I know how important it is for the community
  • Yes - remembering the mode switch makes sense - its just based on ?viewer=html5 at the moment - but I can set a cookie as a temporary measure - and then eventually store the user preference against the user account
  • I think there's at least an off-by-one error with the positioning of PoIs, but I'm also not sure how layering and layer coordinates work with the new viewer - also - some PoIs are sideways views, which the new map viewer doesn't currently support - so maybe broken PoIs are actually side views?
  • I've already made a subreddit post - basically a copy of this announcement - will try and keep both places updated

This is much appreciated, thanks you delicious friend!

Bug report: Pressing + or - seems to set X/Y to NaN/NaN, forcing a refresh.

Hey Eniteris; definitely something off with coordinates, NaN/NaN coords should definitely be caught and constrained so we can always see the map.


Logged

Eniteris

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress Map Archive HTML5 Alpha
« Reply #4 on: April 19, 2022, 06:13:38 am »

Hmm, is there a documentation for keyboard shortcuts for navigation? I worked out -/= for zoom (works on a different map) and </> for z-levels, but are there more commands? Such as keyboard panning, that's a good trick.

I noticed that you were looking for maps that failed on +/- in the Github issues; this and this both fail on +/- for me.
Logged

Markavian

  • Bay Watcher
  • DF Map Archive Admin
    • View Profile
    • DF Map Archive
Re: Dwarf Fortress Map Archive HTML5 Alpha
« Reply #5 on: April 19, 2022, 02:16:41 pm »

Hmm, is there a documentation for keyboard shortcuts for navigation? I worked out -/= for zoom (works on a different map) and </> for z-levels, but are there more commands? Such as keyboard panning, that's a good trick.

I noticed that you were looking for maps that failed on +/- in the Github issues; this and this both fail on +/- for me.

Try with the new version - the zoom should be fixed now for maps which don't have a starting point of interest. I've confirmed the bug + fix with those maps using ?version=v1.0.2 compared to ?version=v1.0.3

The current keyboard commands are just change layer and zoom, click and drag is the only way to move maps at the moment:
- https://mkv25.net/dfma/viewer/js/v1.0.3/index.html

Will definitely be adding more keyboard commands as a feature.


2022-04-19
  • Released v1.0.3 of the map viewer with a bug fix for certain PoIs.
  • Removed pixelDensity setting which should increase the font resolution.
  • Added more on screen logging for debug purposes.
  • Added support for dynamically switching map viewer version to http://localhost with the ?version=localhost flag.
  • Added support for dynamically switching map viewer version to other versions with the ?version=v1.0.3 flag.

Oh, also think I added "remember HTML5" setting between page views using the $_SESSION object.
« Last Edit: April 19, 2022, 02:18:29 pm by Markavian »
Logged

Nopenope

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress Map Archive HTML5 Alpha
« Reply #6 on: April 19, 2022, 02:19:48 pm »

[wrong topic, ignore]
Logged

Eniteris

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress Map Archive HTML5 Alpha
« Reply #7 on: May 28, 2022, 03:30:13 pm »

Is there a possibility to change the zoom interpolation? For small tilesets, the edges are antialiased, which I think is unintended behavior.
Logged