Overview

The leaderboard service provides points leaderboards which are a set of leaderboards that are commonly used by games.

  • Streamer's top players- The top players who played games streamed by a specific streamer
  • Streamer rank & score- The streamer's rank and score based on the cumulative score of streamer's top 10 players
  • Top streamers- List of highest ranking streamers
  • Top players- The top players across all streamers

All points leaderboards can be filtered by season and provide two timeframes: Weekly and all time.

Usage

BigScreen

Because users not have permission to modify leaderboards, BigScreen cannot push score to leaderboard service directly.

However, BigScreen can push leaderboard score through the RMB. The sample code below requires BigScreen to first create a session and connect to RMB.

var streamerID = AuthController.CurrentUser.UserID;
var playerID = "<mock-player-id>";
var scores = new List<LeaderboardRecord>
{
new LeaderboardRecord
{
Score = 10,
UserID = playerID,
}
};
var currentSeason = "0";
IntServiceResponse resp = await BigScreen.Manager.MessageBus.SendLeaderboardScores(scores, streamerID, currentSeason);
Debug.Log($"total of {resp.Loaded} scores updated for streamer {resp.StreamerID}");

Note that players on Client side is not able to push scores through RMB. Doing so will result in errors.

BigScreen and Client can query points leaderboard directly from leaderboard service using the leaderboard client.

RankingRecord record = await mManager.Client.GetStreamerRanked(streamerID, currentSeason);
Debug.Log($"User: {record.UserID} rank: {record.Rank} score: {record.Score}");