Menu

Fitting a whole game build into a URL fragment, stamped with the patch it was made for
📰

Fitting a whole game build into a URL fragment, stamped with the patch it was made for

DEV Community: typescript·Edinamar Luce·about 2 hours ago
#demBfahg
#devtotypescript#devto#dev#version#class
Reading 0:00
15s threshold

I run a small fan-made build planner for Azeroth Survivors, a browser survivor game. The planner has no accounts and no database of builds. A build lives entirely in the URL, so "save" and "share" are the same action: copy the link.

That constraint shaped two pieces of code I want to walk through: how a full build fits into a short URL fragment, and how a link made months ago tells you which parts of it a later game patch may have broken.

What has to fit in the link

A build in this game is a class (nine of them), up to six skills, a set of skills you "banish" from the level-up pool, and talent points spread across three trees. Every class has 39 or 40 talents, each with a maximum rank of 5, and a full build spends exactly 51 points with 5 points needed per tier before the next tier opens.

The naive version is JSON in a query string.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.