part 48
How the site audamir.io was made and how it connects to the game
On 1 and 2 November 2026 a blog about a game became a website with languages, a home page, a change log and a player card passed between the site and the game.
The blog The Dice Are Cast was, until 1 November 2026, a folder of forty Markdown files and six tools that turned them into pages. By the evening of 2 November it had become the website audamir.io: a home page with a PLAY button, the change log of the game, a blog in several languages, a 404 page, a picture for sharing a link, a tool that uploads to a hosting, and an agreement with the game about what the site and the game exchange. This article tells how each thing was decided and why.
From a folder to a website
The first commit of the site's repository, of 1 November 2026, had 40 articles (01-dvadsat-rokov.md to 40-nahlady-v-nastaveniach.md), blog.json, planned.json, assets/ and six tools. No languages, no home page, no deployment.
The answer to how to make it multilingual without rewriting anything was one sentence: the number of an article is its identity in all languages. A file is posts/<language>/NNN-slug.md, and the same number in another language is a translation of the same article. The slug may differ, because the address is /<language>/blog/<NNN>-<slug>.html. The check rejects a translation without an original.
The number does not change after publication, because it is part of a link that someone saves or sends on. While an article is a draft, the number can still change.
blog.json lists nine languages; two are enabled (sk, en). A new language is enabled in the configuration and gets its own catalogue; the check rejects a catalogue that lacks a key.
The generator is plain Node with no dependencies (Node 18 or newer). The output is static files, and the server needs neither PHP nor Node. The pages have relative addresses, so they can also be opened from a file.
The home page and the change log
The home page has a short description, a panel with the PLAY button, a placeholder for a video, the latest change log entries and the six newest articles.
The video does not load by itself. While video.src in blog.json is empty, a placeholder shows; once it is filled in, the video loads only after a click. The provider is not decided (YouTube without cookies, or a file of its own).
The change log is not written again, it is read from the source of the game. tools/changelog.js loads js/data/changelog.js from the game's repository (the path gameRepo in blog.json), so the site cannot say anything different from the game. The cost: the list is read at build time, not from the deployed game. The safeguard is the option --changelog-up-to (with build:site, --match-game), which hides newer entries. On 3 Nov 2026 the script warned that it had copied the game 0.90.5, while the game's repository is at 0.97.1. The list has 88 entries and is in English.
The icon that is a copy
The icon of the site is the icon of the game: a Viking helmet on a board. On 1 November it replaced the die.
- The icon is a copy, not a link. Six files are copied with
npm run sync:icons, because the site must build without the game's repository. - **It is embedded as
<img>, never as inline SVG.** The game's icons carry their own<style>, which would affect the whole page. The cost: an SVG image does not follow the page's appearance switch, only the system's. When the system is light and the page is set to dark, the header shows a light tile on a dark background. Readable, not perfect.
The PLAY panel shows the helmet until the game writes the player card.
The player card: a small document, not access to the game
The site and the game share one domain, so they share localStorage. The site wanted to show who is playing: the hero's name, avatar and a number showing how far they have got. The decision: one small, versioned, tolerantly read document, key audamir.card, written by the game and read by the site. Its shape is in docs/GAME-CARD.md.
Why not read the game's profile? This is derived from the design, not a quotation from the documents:
- The site must not load the game's code. It must be static, with no third-party scripts. Reading one key is cheap; starting the game for a menu is not.
- The inside of the game's storage changes. The card is a shape kept stable and extended only by adding fields.
- The card is a summary, not the source of truth. When it is lost, the game writes it again from the profile; nothing in the game reads it (DESIGN §131.5).
Evidence for point 2 came a day later: on 2 November the game renamed its key prefix from diceWars. to audamir.. The card was not affected. The only other key the site reads, the game's settings (for the language), was affected, and the site had to look for it under both names.
Why audamir.card and not diceWars.card: the card is an interface to the site, not the game's internal state, and an interface should not be named after one of its two sides. The game must not name any of its keys theme, lang or card; a test in tests/pages.test.js guards this.
What the card carries
The card is JSON v1. The site tolerates missing and unknown fields, so the game may extend it.
| Field | Required | Reading rule on the site |
|---|---|---|
v | yes | version of the shape, now 1 |
level | yes | 1 to 999; shown only when the card has no valid reputation |
reputation | no | whole number 1 to 9999; if valid, the panel shows the reputation instead of the level and the XP bar |
name | no | at most 40 characters, as text only |
xp, xpNext | no | progress bar of the level |
avatar.image | no | data: URL (PNG, WebP or SVG), at most 20,000 characters |
avatar.label | no | image description for screen readers |
realm, gameVersion, updated | no | informative; the site does not use them |
The site does not trust the card. AudamirCard.parse() returns "no card" for bad JSON, a non-object, or a missing v or level. Everything is inserted with textContent; the image src is set only for data: URLs of PNG, WebP or SVG in base64. On any error the panel keeps the general picture with the helmet and the PLAY button.
The game draws the image
The avatar is a finished image that the game prepares. The site has no helmet drawing of its own, because the 21 forms (HeroForms.formOf) would have to be kept in two places.
The game draws the helmet with style sheets, and an <img src="data:…"> cannot reach them. The solution (DESIGN §131.4): js/ui/helmet-image.js builds a standalone SVG and writes the colours the browser computed (getComputedStyle) as classes in its own <style>. The length runs from 9,474 characters (form 1) to 13,238 (form 21), below the limit of 20,000.
Which level belongs on the card
The game has no single level: since 29 October 2026 each realm has its own (R3a). The only number across the realms is Asgard reputation, the sum of the realm levels; the helmet and the title come from it.
The chosen rule (DESIGN §131.2): the card carries the level of the realm in which the hero is furthest; on a tie, the realm with more progress in its level, then Kastgard, then the first registered. A player who has played nothing has level 1 of Kastgard. The image is the helmet of the whole reputation. Three other options were rejected: reputation as a level (a number no screen of the game calls a level), the realm played last (the card would jump between realms), and always Kastgard (a player who plays only Rokgard would have level 1). The cost: the helmet is the whole hero and the level is one realm, two numbers that do not match, as on the game's home screen.
On 2 November the site wanted to show Asgard reputation on its panel (DESIGN §131.8). The solution is additive: the card got an optional field reputation (1 to 9999), and v stayed 1. If the field is missing (the card was written by an older game), the panel falls back to the level with its bar.
For a new player (reputation 0) the field is left out (DESIGN §131.8): a "1" for a player with no games would give the same card to a player who has played nothing and to one who has finished a game.
Who writes the card, and when
Only when the game runs on the web (Build.target is web). The write happens at the end of App.init and after each profile or settings change, only when something changed (the text is compared, apart from updated). The card holds nothing personal except the name the player gave the hero; the game allows 16 characters, the card 40.
Verified (DESIGN §131.6): shape tests against the reading rules, all 21 helmet forms against index.html, a storage that refuses writes, and 44 mutants, six of which survived the first tests; after additions all are killed. In the pane's Chromium, a clean profile with ?lang=sk wrote a card with level 1, and a profile of level 31 showed "Ivka, Level 31, 100 / 1575 XP".
?lang= in the address: a mistake that a browser revealed
PLAY adds the site's language to the game's address (/game/?lang=sk). The first rule, from 1 November, was: the address asks, it does not decide (a saved language wins).
The rule passed the tests but failed on a clean origin in a real browser (DESIGN §131.9): ?lang=sk on empty storage opened Slovak, but any other change of a setting (for example, turning the sound off) wrote the whole settings object, including lang, because lang has a default value and serialisation keeps the whole object. From then on the saved language beat the address, although the player had never chosen one. Clicking EN on the site and then PLAY opened the game in Slovak.
The corrected rule is approved: a valid ?lang=xx wins over the saved language; the game saves it and removes the parameter from the address (history.replaceState). An invalid parameter saves nothing. Links that the player sends on (#c=, #R=, the text of a result) do not carry the parameter, otherwise whoever shares would impose their language on everyone who opens the link.
Evidence (DESIGN §131.9): 28 mutants (26 killed; two were not real mutants and were removed from the code), and data of the old code: without ?lang= the saved settings stay byte for byte.
Which language the site opens
The root / opens /{language}/ in four steps: (1) the language last chosen on the site (audamir.lang), (2) the game's language from its settings, (3) the browser's language, (4) en. The original brief had no first step; the site's maker added it, because otherwise the language switch would mean nothing after returning to /.
The second step reads audamir.settings, then diceWars.settings. A decision: a key with no readable language is skipped, because a mistake on the root costs at most a wrong language, which the visitor switches. Each read has its own try/catch. This must be deployed before the game with the new keys.
A link to the game that is a file
The link is relative: from sk/index.html it is ../game/index.html?lang=sk. The reason: dist/site/ can be browsed from a file, where an absolute /game/ leads to the root of the disk. The cost: the game has two addresses of the same page, /game/index.html?lang=sk and /game/?lang=sk. Both work, because the game's service worker falls back to index.html. The card does not work from a file, because every page from file:// has its own origin in Firefox. A real preview with the card is npm run serve -- --site.
Less visible decisions
Command names. The original build built both the preview and the site. The commit of 2 Nov split it: npm run build:preview makes the preview in dist/preview/ and is not uploaded; npm run build:site makes the whole site and is the only input of the deployment. npm run build is gone.
The 404 page. The hosting shows it on any address, so its addresses start at the root (/assets/style.css). It is independent of language, is not in the sitemap and has noindex.
Protection of published article numbers. From 1 November the rule was only a sentence in the README. The commit of 2 Nov turned it into published.json, a list of numbers and slugs per language. node tools/check.js fails when a recorded number or slug changes, an article disappears or goes back to a draft, and also when an article is published but not yet in the list. The list has 25 Slovak records today and the English one is empty; npm run published -- --add writes it. It says what is considered published, not what is on the web.
The picture for sharing. assets/og-image.png (1,200 × 630 px) is only the real icon of the game, in the middle of a background in the icon's own shades. There is no text and no invented logo; the networks show the game's name from og:title. The tool tools/og-image.js writes the PNG itself.
Period snapshots
The pictures are from the first commit in which each part of the site exists.






What is decided and what stays open
Decided: the number is the identity of an article in all languages; the card audamir.card v1 with the optional field reputation; the key of the interface belongs to the site; the language of the address wins over the saved language and the game saves it (approved by me); the site reads the game's settings under two names; the change log is read from the game's source; the icon is a copy; the game is only copied into the site; published.json is per language.
Waiting for me: to enable the English blog at the start or only with the first translations (question 5); to approve the texts of the home page (16); to choose a video provider (17); to add a legal page (19).
What I take from it
- The interface between two things should be a small document, not access to the inside. The card survived the renaming of the game's storage keys unchanged; the one key the site read directly forced a change of code and of a test.
- An interface is extended by adding fields.
reputationcame without a change ofv. - **The mistake in
?lang=was found by a real browser on a clean origin, not by a test.** The test checked a rule that was itself wrong. - A value stored without a decision is not a choice. The saved
langwas a default value written when another setting changed. - A published number is a contract, so a tool should guard it, not memory.
Sources and notes
- The
git logof the site's repository (21 commits, 1 to 2 November 2026);README.md,docs/GAME-CARD.md,docs/OPEN-QUESTIONS.md. - Documents of the game (0.97.1 at the time of writing):
docs/DESIGN.md§131.1 to §131.9 anddocs/ROADMAP.mdchapter 31. - Measurements on 3 Nov 2026:
node tools/build-site.js(83 files, 25 articles, 88 change log entries). Numbers from DESIGN are taken without recalculation. - Related articles: Twenty years, Tiles, Tribes: a copy that can be measured.