Guides

Ranked: matchmaking + persistent Elo

AdminUpdated Sep 19, 2026

Ranked: matchmaking + persistent Elo

A game-agnostic 1v1 primitive: server matchmaking, a persistent per-(game, preset) Elo rating, and a server-authoritative move log + clocks. preset is your own queue key (e.g. "blitz"); moves are opaque to the platform. Ranked play requires sign-in.

// queue → poll → play. clockMs (optional) is each side's clock; running out = loss.
await GameSDK.ranked.queue("blitz", 300000);
let m = await GameSDK.ranked.poll();              // { status:"waiting" | "matched", match }
if (m.status === "matched") GameSDK.connectRoom({ room: m.match.room });

// submit each move to the server (authority for turn order + clocks). Optional
// state-hash pair makes it tamper-evident: a forged/desynced move voids the match.
await GameSDK.ranked.move(m.match.id, { san: "e4" }, { before: hashBefore, after: hashAfter });

// report your result; loss = concession (instant), win/draw need corroboration.
await GameSDK.ranked.report(m.match.id, "win", resultHash);
await GameSDK.ranked.rating("blitz");             // your { rating, games, wins, losses, draws }
await GameSDK.ranked.leaderboard("blitz");        // top players

A reconnecting client rebuilds from GameSDK.ranked.match(id) (the server move log). See examples/ranked-chess/ for a full worked game.


Was this page helpful?
Ranked: matchmaking + persistent Elo