12 min read
Metrics schemas, ranking, and seasons
Design stable metrics and deterministic leaderboards.
Schema design
- 1.Use bounded integer/number/boolean/enum metrics.
- 2.Mark only legitimate ranking metrics as rankingEligible.
- 3.Add max-rate rules for impossible combinations.
- 4.Save as Draft, validate, then explicitly publish; Published and Superseded scoring versions are immutable.
- 5.Never trust client timestamps.
Dashboard workflow
- 1.Open Player Platform from the game dashboard.
- 2.Use Builder for metrics, ordered tie-breakers, and seasons, or switch to JSON for the complete contract.
- 3.Run Preview to see JSON-path findings and a diff without saving.
- 4.Save Draft, validate the saved revision, then confirm explicit publication.
- 5.Use Export JSON to keep d3-game.config.json with the game source.
Preview and upload never publish. Only the Publish validated version action changes runtime scoring.
Ranking
- 1.Declare asc/desc primary order and ordered tie-breakers.
- 2.Ties fall back to earliest server achievement and immutable run ID.
- 3.Private, guest, rejected, invalidated, and suspended entries are excluded.
- 4.Use seasons instead of destructive resets for recurring competitions.
Pagination at scale
- 1.Treat nextCursor as an opaque signed value and return it unchanged for the next page.
- 2.A cursor is bound to one leaderboard, season, and environment and cannot be reused elsewhere.
- 3.Keyset pagination stays stable when new scores arrive; never decode a cursor or construct offsets.
- 4.Around Me and personal best use the same privacy-aware indexed order.
CURSOR_INVALID means the cursor is malformed, expired by contract changes, or belongs to another board context. Restart from the first page.