Access
Connect cross-platform accounts & identity management
AccelByte Cloud’s Leaderboard service enables you to keep track of players’ scores and ranking in the game by collecting data from the Cloud Statistics (opens new window) service such as the number of matches played, the player’s matchmaking rating, and their experience points. The Leaderboard service will use this data to calculate each player’s rank. This service supports multiple leaderboards in one game, including a daily leaderboard for day to day player activities, weekly leaderboard for a weekly player recap, a monthly leaderboard to record player activities every month, a seasonal leaderboard for seasonal player activities such as holiday events, and also an all-time leaderboard to record and player activities for all time. Each cycle of the leaderboard is explained in greater detail below.
Before you create a leaderboard config, make sure you have created a statistic configuration (opens new window) in the same game namespace. Statistics configs are used to update a player's leaderboard rank.
Permissions (opens new window) are used to grant access to specific resources within our services. Make sure your account has the following permissions before you attempt to manage the leaderboard in the Admin Portal. For a full list of permissions that impact leaderboards management, see the Leaderboards tab of the permissions reference (opens new window).
Usage | Resource | Action |
List All Leaderboards By Given Namespace | ADMIN:NAMESPACE:{namespace}:LEADERBOARD | Read |
Create New Leaderboard | ADMIN:NAMESPACE:{namespace}:LEADERBOARD | Create |
Get Leaderboard By Leaderboardcode | ADMIN:NAMESPACE:{namespace}:LEADERBOARD | Read |
Get User Ranking | ADMIN:NAMESPACE:{namespace}:LEADERBOARD | Read |
Delete User Ranking | ADMIN:NAMESPACE:{namespace}:LEADERBOARD:USER | Update |
Permissions work slightly differently depending on whether they are assigned to IAM Clients (opens new window) or Roles (opens new window) assigned to users. For more information, read the Authentication and Authorization (opens new window) documentation.
In the Leaderboard menu of the Admin Portal, click the Create Leaderboard button.
Fill in the required fields.
When you’re done, click the Add button to create your new leaderboard and the new leaderboard will appear in the Leaderboard List.
NOTE
After creating the leaderboard, make sure that the configuration is correct as you will not be able to edit the leaderboard once it starts.
In the Leaderboard List of the Admin Portal, choose the leaderboard you want to see ranking data for by clicking on the Action column and selecting View.
In this example, we choose to see the all-time leaderboard rankings. You can view the rankings for all cycles of leaderboards.
In the Leaderboard List tab, choose the leaderboard that you want to delete. Then click Delete in the Action menu next to that leaderboard.
The Delete Leaderboard form appears. Select the Take a Snapshot Before Deletion box if you want to archive the first 1000 records of the leaderboard and type DELETE in the available fields.
Click the Delete button to delete the leaderboard.
Go to the Leaderboard page and open the Snapshots tab.
In the Snapshot tab, you can see all of the archived leaderboards. To open a leaderboard, click View in the leaderboard’s Action menu.
Here you can check and see the list of the leaderboard that you already deleted before.
Retrieve all player rankings using a specific leaderboard code. The data is presented in descending order.
Get a specific player’s ranking using their User ID and the desired leaderboard code.
Before using the Leaderboard service from the SDK, you will need to initialize your server-side SDK to make you authorized and able to perform create, read, update, and delete actions.
Before using the Leaderboard service from the Golang SDK, you will need to initialize the SDK by following the steps below:
Once completed, you can use the Golang SDK to create, read, update, or delete the Leaderboard (opens new window) service from your serverless app.
Before using the Leaderboard service from the Python SDK, you will need to initialize the SDK by following the steps below:
Once completed, you can use the Python SDK to create, read, update, or delete the Leaderboard (opens new window) service from your serverless app.
Before using the Leaderboard service, you will need to set some permissions. Use the following .NET namespaces:
using AccelByte.Sdk.Api.Leaderboard.Model;
using AccelByte.Sdk.Api.Leaderboard.Operation;
using AccelByte.Sdk.Api.Leaderboard.Wrapper;
Before using the Leaderboard service, you will need to set some permissions. Initialize the LeaderboardConfiguration wrapper from the Leaderboard service using the following code:
LeaderboardConfiguration wLeaderboard = new LeaderboardConfiguration(sdk);
Once completed, you can use the SDK to create, read, update, or delete leaderboards.
Use the following function to create a leaderboard (opens new window):
Use the following function to delete a leaderboard (opens new window):
Use the following function to retrieve a leaderboard (opens new window):
Use the following function to update a leaderboard (opens new window):
← Achievements Rewards →