EOS Interfaces
Leaderboards
Video Tutorial is available
A leaderboard ranks players by one Stat. Create it in the Developer Portal (Game Services > Leaderboards) and pick the stat and the sort order. You never write to a leaderboard directly: ingest the stat and the leaderboard updates.
Common Nodes
| Node | Use |
|---|---|
EOS_Leaderboards_QueryLeaderboardDefinitions | Downloads the leaderboard definitions |
EOS_Leaderboards_GetLeaderboardDefinitionCount + EOS_Leaderboards_CopyLeaderboardDefinitionByIndex | Reads the definitions |
EOS_Leaderboards_QueryLeaderboardRanks | Downloads the top ranks of a leaderboard |
EOS_Leaderboards_GetLeaderboardRecordCount + EOS_Leaderboards_CopyLeaderboardRecordByIndex | Reads the ranks (rank, score, user id, display name) |
EOS_Leaderboards_CopyLeaderboardRecordByUserId | Finds one player in the downloaded ranks |
EOS_Leaderboards_QueryLeaderboardUserScores | Downloads the scores of specific players, for example friends |
EOS_Leaderboards_GetLeaderboardUserScoreCount + EOS_Leaderboards_CopyLeaderboardUserScoreByIndex | Reads those scores |
Typical Flow
- Ingest the stat with
EOS_Stats_IngestStatwhen the match ends. - Call QueryLeaderboardRanks with the leaderboard id.
- Loop over GetLeaderboardRecordCount and CopyLeaderboardRecordByIndex to fill your UI.
Example

The QueryLeaderboard event downloads the top ranks of the HIGHSCORE leaderboard and prints them as 1. PlayerName - 1500:
- EOS_Leaderboards_QueryLeaderboardRanks downloads the ranks. Leaderboard Id is the id from the Developer Portal.
- When the query succeeds, EOS_Leaderboards_GetLeaderboardRecordCount returns the number of downloaded records.
- The For Loop reads each record with EOS_Leaderboards_CopyLeaderboardRecordByIndex. A record has the Rank, Score, User Id and User Display Name of a player.
tip
A leaderboard only changes when its stat is ingested, see Stats. The new score can take a short while to show up in the ranks.
Online Subsystem
The EOSCore Online Subsystem also implements IOnlineLeaderboards, so the engine's Read Leaderboard Integer and Write Leaderboard Integer nodes work as well.