Sign In Register

How can we help you today?

Start a new topic

"Player Stats" Leaderboard with multiple sort criteria


I would like to show my players leaderboards across multiple variables.

Suppose I store the following for each player:

- XP

- total number of kills

- total time spent in the game

One way to do this is to have one running total gathering all that info and create separate leaderboards, each sorting on one of the variables.

Is there a smarter way to do that ? A way that would require less server work or storage ?

I was thinking of using the DataService and write some sorting queries for that, but I am not sure how I would replicate features like "include first", "around me", etc, that are very useful in Leaderboards. Also, I assume that my queries may end up being much slower than the way leaderboards are implemented.

What do you think ?

1 Comment

Hi Francois,

If you want to store extra data to a leaderboard you can pass it as supplemental data. This is under the assumption that these values are not correlated to the leaderboard ranking calculation. For example you could have a leaderboard that ranks players by XP but it will also show you the players kills and total time spent in a game as supplemental data. To add supplemental data to a leaderboard you can change the aggregation type of an event field to supplemental and add that field as a running total to the leaderboard. The example below shows a leaderboard that will also display the user's display name along with their score.



//Leaderboard data



Login to post a comment