• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Tibia XYZ - Minimap Viewer

Don't floors go from deep being 0 and highest being 15? Seems like you have it backwards, or maybe I'm wrong.. xD
Nice feature though. :p
 
Very cool! Two questions/suggestions:

1. Have you considered open-sourcing the non-minified code on GitHub? That would make it easier for people like me to contribute patches.

2. How about using using just plain images for the maps? They could be taken from the open-source Tibia maps project: https://github.com/tibiamaps/tibia-map-data This would have several benefits: a) you no longer have to load and parse multiple *.map.gz files — instead you just get a single HTTP request per floor. Less code, better performance. b) you wouldn’t have to manually update the map files anymore — you could hotlink e.g. https://tibiamaps.github.io/tibia-map-data/floor-07-map.png (for floor 07) and it will automatically be updated whenever new maps are released.

I am the primary maintainer of the tibia-map-data project so feel free to contact me if you’re interested in this. I’m happy to help.
 
Last edited:
Very cool! Two questions/suggestions:

1. Have you considered open-sourcing the non-minified code on GitHub? That would make it easier for people like me to contribute patches.

2. How about using using just plain images for the maps? They could be taken from the open-source Tibia maps project: https://github.com/tibiamaps/tibia-map-data This would have several benefits: a) you no longer have to load and parse multiple *.map.gz files — instead you just get a single HTTP request per floor. Less code, better performance. b) you wouldn’t have to manually update the map files anymore — you could hotlink e.g. https://tibiamaps.github.io/tibia-map-data/data/floor-07-map.png (for floor 07) and it will automatically be updated whenever new maps are released.

I am the primary maintainer of the tibia-map-data project so feel free to contact me if you’re interested in this. I’m happy to help.

1. This was a quick project I made one night, I'd have to clean up the code before open sourcing it, I'm not opposed to it though.

2. I use the minimap files because of the low bandwidth it takes to transfer them when compressed. The code to transform the minimap files to images is very performant, even on mobile.
The images produced are cached for even better performance. Loading the whole floor would lose the tiling benefit which keeps memory consumption down (important for mobile).
None of these things really matter for the current use of tibia.xyz, but the code is used in a lot of other projects (The OX Server, XenoMap, etc) and these have features that rely on these optimizations.

As far as updating, it's been on my list to automate updates from tibiamaps.org. Either way I'm in the same boat, either waiting for you to update your images, or Lilith to update her AutoMap.
Luckily there's nothing I have to run to update the maps, I simply have to copy her maps to Amazon S3 and the client does the rest.
 
1. This was a quick project I made one night, I'd have to clean up the code before open sourcing it, I'm not opposed to it though.

Please open-source tibia.xyz, cleaned up or not :) Thanks!

2. I use the minimap files because of the low bandwidth it takes to transfer them when compressed.

If we forget about the benefits of tiling for a second and only look at the total file size, i.e. the maximum bandwidth used in the worst-case scenario of viewing/loading ALL maps, we get these numbers:
  • Total size of all *.map files in the tibia-map-data project, after gzip-compressing: 5.1 MB
  • Total size of all floor-*-map.png files in the tibia-map-data project, with no compression at all*: 3.2 MB
* On the server side, whenever pulling in updates, you could run an automated script that optimizes the newly-imported PNG images using pngcrush, optipng, advpng, zopfli-png, pngnq S9, or pngquant to reduce their file size significantly.

The images produced are cached for even better performance. Loading the whole floor would lose the tiling benefit which keeps memory consumption down (important for mobile).

Have you tested this or are you making assumptions? I haven’t tested memory consumption when loading a page containing one such PNG image vs. a page with the JS with the tiling logic + code to parse several *.map files at once. Now I’m really curious about the difference though :)

As far as updating, it's been on my list to automate updates from tibiamaps.org. Either way I'm in the same boat, either waiting for you to update your images, or Lilith to update her AutoMap.

You wouldn’t have to wait on anyone if you hotlinked to the GitHub-hosted PNGs. As soon as the tibia-map-data project gets updated you’d get the new maps automatically. Then again, I could see why hotlinking may not be desirable.

Btw, I’m working with Lilith. He’s kind of retired, so I’m maintaining the maps now. Releases of the tibia-map-data project (https://github.com/tibiamaps/tibia-map-data/releases) are simply mirrored on tibiamaps.org. The tibia-map-data project is the actual source for the tibiamaps.org maps (and soon for TibiaWiki, too).
 
Back
Top