Skip to content

Leaderboards, achievements and profiles

Phase 6a added these (ADR 0027). The arcade template (--template arcade) uses all of 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: higher is better for scores; use lower for times (with "format": "time").
  • min and max bound what a fair run can reach. Scores outside them are refused.
  • hidden achievements show as “???” until a player unlocks them.
  • Names may be @keys from the game’s string tables. The platform shows them in the default language.

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.

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, never Math.random; gameplay in fixed systems;
  • 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.

/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.