question

empika avatar image
empika asked

Is it possible to get the mean/median for a leaderboard?

Hi there,

We are considering using PlayFab for our game, however our leaderboards will only be used to display the mean value of points scored on each level. Is it possible to get this data from PlayFab?

Looking at the docs it does not seem that this is available directly and some extra work will be required. Grabbing an entire leaderboard and processing on the client does not seem sensible (esp when leaderboard will have up to x00,000 entires).

I presume the best way to do this would be to run a scheduled task each day (or however frequently we require) that will process each levels leaderboard and set a custom title setting for it? Or is there something more optimal that I'm missing.

Many thanks

Leaderboards and Statisticsscheduled tasks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

No, you would need to store the scores for players in an external system, if you want to do something like this. We do not support any logic which requires reading the entire leaderboard for the game in one operation, as that could be millions of entries. Also, since players will be continually updating their scores, trying to all the scores from the leaderboard while it's being updated by players is going to cause your calculations to be inaccurate.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.