2 min read

Dev Update: Map tiles, backlinks, aliases

Feature image for Dev Update: Map tiles, backlinks, aliases

Hey folks! It's been a while since the last dev update, so let's do a round-up of the latest changes to LegendKeeper. This post will get a litte bit technical because I ๐Ÿ’โ€โ™‚๏ธfeel like it๐Ÿ’โ€โ™‚๏ธ.

Map Tiles

The map tiling system got a huge upgrade in 0.15.4.0. In case you've already forgotten, here's how it worked prior: To use an image as a map, you'd upload a "Map Image", wait 1 to 15 minutes for it to process, and then use that sweet slippy tile map.

That... sucked. It was the oldest, jankiest code in the LK codebase, and was super fragile, exploding at every oddity in an image. Also who wants to wait 5 minutes to use a map? Here's a diagram of how that worked.

But that'sthe OLD way, the way you do things in 2015. You have to wait for the whole image to process, and you generate many tiles at zoom levels that never get used.

Enter: on-demand tiling, demonstrated in this diagram.

In this setup, the tiling system doesn't make a tile until specifically requested. The first load is slower, but once a tile is created, we cache it on a 30-day refreshing timer. If it's not in the cache, we chop the tile from the original image again.

Does this mean I get to delete 5 terabytes of legacy map tiles and reduce my storage bill by 95% while providing even better service? Yes. Yes it does. In my testing, this reduced the processing time of the high-res Faerun map from 4 minutes to 8 seconds. That's spicy.

In 0.15.2.1, I added proper Backlinks. LegendKeeper had a half-assed implementation of backlinks in the Mentioned block, but it was cheating. It searched your project for your element's name, resulting in false positives and negatives. It couldn't support renamed links, aliases, etc.

Now, everytime you mention another element in a page, we catalog its ID in a special database. We create a reverse index, making the query "What elements reference this one" an easy task. Then we list those elements.

Aliasing

Backlinks paved the way for Aliases, aka multiple canonical names for elements, in 0.15.3.0. By adding an Alias block, you can add alternate names that can be used in autolinking, mentions, and search. And, they'll still show up in the Backlinks block, thanks to update 0.15.2.1.

What's next?

Next up, I'm completing work on a new, streamlined element creation flow. LegendKeeper's first time user experience isn't the best, and a new creation flow and easier-to-use maps will improve that. Once the new creation flow is complete, I'll make new tutorial videos, and finish Timelines.

Published
Written by Braden Herndon

Join 3,000+ worldbuilders getting practical tips

The LegendKeeper worldbuilding newsletter provides creative deep dives, RPG content, inspiration, and occasional product updates.

Unsubscribe anytime. Your email will be guarded with unbreakable wards.
Read our privacy policy.
ย