Skip to main content

Configuring cycled leaderboards in the new Leaderboard service

Last updated on December 6, 2023

Overview

The AccelByte Gaming Services (AGS) Leaderboard service supports cycled leaderboards. A cycled leaderboard runs for a specific time period and then resets, giving players repeated chances to compete for a spot on the leaderboard. The new leaderboard version is allows you to use specific time windows configured in statistic cycles so that you can flexibly choose the time frame for your leaderboard.

Goals

In this section, you will learn how to set up a leaderboard configuration to rank users' statistic values for a specific time window/cycle using a preset statistic configuration.

Prerequisites

  • Access to the AGS Admin Portal.
  • Access to the AGS Leaderboard. See the API documentation for more information.
  • Access to the AGS Statistics API to configure the required information.
  • Pre-configured statistic information that you use to rank the users’ values.
  • A pre-configured stats cycle that you use to set the leaderboard time frame.

Configuring a cycled leaderboard

Before configuring the leaderboard, you need to define the metrics you want to track and display on the leaderboard. These could include things like score, time taken to complete a level, number of wins, etc. You can store the metrics by configuring a statistic configuration by following this guide.

Other than configuring the leaderboard, you can also configure its cycles by using the Statistic Cycle guide. The statistic cycle will be related to your configuration parameters in creating a leaderboard. You can configure the leaderboard by following the steps below:

  1. In the AGS Admin Portal, go to the Game Management section and select the Leaderboard New Version menu.

    click the Leaderboard Menu new version

  2. On the Leaderboard page, to create a new leaderboard, click on the Create Leaderboard button.

    click the Leaderboard Button

  3. You will be presented with a form to configure your leaderboard. On it, you will be required to:

    • Fill in the Leaderboard Code using the allowed formats.

    • Fill in the Stat Code with the related statistic configuration that you’ve created. This will be the statistic that the leaderboard draws from.

    • Fill in the Leaderboard Name to make it easier for you to identify the leaderboard in the future.

      add a leaderboard configuration form

  4. Once the Stat Code is filled, you can pick the cycle for the leaderboard. Based on how you completed the form above, selecting a cycle may be mandatory. There will be two different configurations for the cycle.

    • Cycle(s) will be referring to the available cycle that corresponds to the selected Stat Code filled.

    • All-Time Cycle should be used if Cycle(s) are left empty. It will not refer to any cycle from the Statistic Configuration and there will be no end time/expiration for the leaderboard with this configuration.

    • Order. You can choose the displayed leaderboard data to be listed in Ascending or Descending order.

      configure leaderboard cycles

  5. When you’re done, click the Add button to create your new leaderboard and the new leaderboard will appear in the Leaderboard List.