Leaderboards, achievements and profiles
Phase 6a added these (ADR 0027). The arcade template (--template arcade) uses all of them.
Declaring them
Section titled “Declaring them”In game.json:
"leaderboards": [{ "key": "score", "name": "@board.score", "order": "higher", "min": 0, "max": 20000 }],"achievements": [ { "key": "first-hit", "name": "@ach.first", "description": "@ach.first.about", "icon": "sprite.items", "iconFrame": 5 }, { "key": "secret", "name": "Secret", "hidden": true }]order:higheris better for scores; uselowerfor times (with"format": "time").minandmaxbound what a fair run can reach. Scores outside them are refused.hiddenachievements show as “???” until a player unlocks them.- Names may be
@keysfrom the game’s string tables. The platform shows them in the default language.
Sending them
Section titled “Sending them”Use rule actions:
{ "action": "submitScore", "board": "score", "value": "session.score" }{ "action": "unlockAchievement", "achievement": "first-hit" }
On the platform, they go through the play bridge for signed-in players. Signed-out players can play, but nothing is kept. Each player keeps their best score per board, and each achievement once.
How scores are checked
Section titled “How scores are checked”Game code runs in the player’s browser, so a score could be faked. Every run’s inputs are recorded: the seed, plus every change of an input action by scene and tick. A score is sent together with that recording.
The top 50 entries of each board are checked by replaying the recording headless in the sandbox. Because the simulation is deterministic, the replay must submit the same score to the same board, or the entry is rejected. Boards mark checked entries with ✓.
What this needs from a game:
- gameplay that is deterministic: randomness from
GameRng, neverMath.random; gameplay infixedsystems; - a score submitted by a rule (or code) during the run, not typed in from outside.
Players can submit 30 scores and 60 achievement unlocks per hour per game. The game’s owner (and moderators) can remove an entry.
Profiles
Section titled “Profiles”/u/<handle> shows:
- a generated avatar (no uploads);
- the games and packs the player published;
- their achievements;
- their best checked leaderboard places.
There is no free-text bio. A private profile (set on /account) is hidden from others, and the player’s name
shows as “A player” on boards.