Leaderboards

Video tutorial. How to add a leaderboard to your game?

Watch the video

Leaderboards are a tool that you can use to display personalized rankings on your game's page, showing top scores and a logged-in user's place in the rankings.

Tip

Leaderboards help improve app metrics, for example, increase traffic and user retention rate. This increases the chances that the game will be included in the Our Choice selection and makes it more noticeable.

You can add a leaderboard in two ways:

  • Using the Yandex Games SDK. Such leaderboards consider only the scores of logged-in users.
  • Edit the game code to ensure that the leaderboards include the scores of all users, regardless of whether they are logged in or not. Leaderboards should be implemented for games where the user expects to see their record or score immediately.

Creating leaderboards

To enable leaderboards, add the SDK code to the source files of your game and connect leaderboards via the Games Console.

  1. Add the SDK code to your game's source files.

  2. Enter the Games Console.

  3. Select the game.

  4. Go to the Leaderboards tab.

  5. Fill in the fields:

    Field

    Description

    Technical leaderboard name

    Name used for interaction within the SDK.

    Localized leaderboard name for display

    The name shown to the user:

    • For your main game language, specify the name in the [] Displayed leaderboard name field.
    • For other languages, click Add localization to and enter the name in the desired language in the field that appears.

    Language codes.

    • be: Belarusian
    • en: English
    • kk: Kazakh
    • ru: Russian
    • tr: Turkish
    • uk: Ukrainian
    • uz: Uzbek

    Main leaderboard

    The Is main leaderboard? option determines which leaderboard is displayed on the game card.

    Warning

    You can only have one main leaderboard. If you create a leaderboard and make it the main one, the option is automatically disabled for the previous leaderboard.

    Leaderboard type

    The leaderboard type that determines the unit of measurement for the results. Acceptable values:

    • numeric: Number.
    • time: Time in milliseconds.
    The range of acceptable values

    The score value accepts only the integer type that can't be negative, and its maximum value is the largest integer available in JavaScript. If you want to display fractional numbers in the leaderboard, set the Size of the decimal part of the score.

    For time leaderboards, values are also considered integers and are passed in milliseconds (1 s = 1000 ms).

    To learn more, see the Mozilla documentation.

    Sort order

    The order of results in the leaderboard. Acceptable values:

    • Descending sort: Users with the highest scores will be at the top.
    • Ascending sort: Users with the lowest scores will be at the top.

    For example, for a speedrun race, it's best to choose the Ascending sort and the time leaderboard type.

    Size of the decimal part of the score

    This parameter determines how many digits of the score integer are displayed after the decimal point. For example, if you set the decimal part size to 2, a score of 5712 will be displayed as 57.12.

  6. Click Submit.

This will create a leaderboard with player IDs shown as cards. You can enable multiple leaderboards for different user groups.

Tip

You can create custom leaderboards directly in your game's code, rather than using Yandex Games SDK methods. This way you can save the scores of users who aren't logged in. You are free to choose any technology for creating leaderboards.

Can I create a new leaderboard with the same name as the old one?

No, you can't reuse the name of a deleted leaderboard or create two leaderboards with the same name. Please try entering a different name.

Editing leaderboards

To view or edit the added leaderboard, scroll down the page on the Leaderboards tab and click Edit leaderboard ''. You can change:

  • Technical name.
  • Localized displayed name.
  • Whether a leaderboard is the main one or not.

For instructions on filling out these fields, see Creating leaderboards.

Note

If you need to edit data you don't have access to (for example, change scores, hide or remove some users from leaderboards), send us a message in the support chat.