RetiPie
SDK

SDK Leaderboards

Declare leaderboard support with retipie.game.configure and submit one score per completed run with retipie.leaderboards.submitScore.

Leaderboards are controlled by the game code. Creators do not manually toggle score support during upload; the current release declares it through the SDK.

Declare support

retipie.game.configure({
  leaderboards: {
    default: { order: 'desc', unit: 'points', precision: 0 },
  },
});

When RetiPie sees this declaration during release analysis, it can mark the current release as leaderboard-enabled.

Submit scores

Submit one score at the end of a completed run.

function gameOver(score) {
  retipie.leaderboards.submitScore(Math.floor(score));
}

submitScore(score) returns nothing. The SDK ignores a score that is not a finite number greater than zero, and the platform only accepts scores up to 1,000,000,000. Scores are kept to three decimal places, but the board is declared in whole points, so submit integers.

V1 leaderboards are all-time high score boards. Higher scores rank above lower scores, and each player keeps their best score. Scores count only while the game is actually being played in the app, and only for signed-in players: guests don't appear on leaderboards.

The root Leaderboards page remains available and explains release update states such as active, legacy, and disabled.

On this page