Leaderboard Sample

Overview of the Leaderboard Sample

2 mins to read

The Leaderboards Sample demonstrates the operations related to the Leaderboards Interface in the Epic Online Services (EOS) SDK, including:

  • Querying leaderboard definitions

  • Querying leaderboard ranking data

  • Querying leaderboard scores of friends

The sample demonstrates these features by providing a user interface that can control these operations and display data directly to the user.

Before You Begin

The sample application uses Epic Account Services to authenticate the local user for demonstration purposes. This requires that the Client Credentials used to initialize the SDK have been assigned to an Application used for Epic Account Services.

The demonstrated SDK functionality can be used with any of the supported identity providers for user authentication.

Getting Started

To begin, log in with the panel on the right.

Leaderboard Definitions

When the sample starts, it will retrieve the leaderboard definitions created via the Developer Portal and display them in a list. The definition names will appear in a column on the right, under the header Leaderboard, as shown below:

Selecting Leaderboards

Click a leaderboard definition to select it. The definition will be highlighted as shown below.

Global Rankings

After you have selected a leaderboard definition, click the SHOW GLOBAL button to display the global ranking data for all users who have scores in the leaderboard.

Click to enlarge image.

Friend Scores

After you have selected a leaderboard definition, click SHOW FRIENDS to display the scores for all friends who have scores in the leaderboard.

Click to enlarge image.

Console Commands

In addition to the standard console commands, this sample supports the following additional console commands, which you can enter in-game:

Console CommandUsageDescription
GETDEFSGETDEFSMakes a request to retrieve the leaderboard definitions for this application.
INGESTINGEST <STAT_NAME> <INGEST_AMOUNT>Ingests a stat with the name supplied in STAT_NAME, with an ingest value of INGEST_AMOUNT. See the Stats Interface for more details.