question

duncanaustin avatar image
duncanaustin asked

Get aggregate statistic across versions

We have a game that has rounds with scoring done per round. There is a leaderboard per round and a global leaderboard which sums the points for all rounds. In some versions we also have a 'finals' leaderboard which sums the points from the final three rounds.

I'm new to playfab, but as I understand it, we would create a leaderboard with a statistic called 'points' and manually reset that per round.

My question is: How would we get the leaderboards for the global results across all versions, or across specific versions (like round 4,5,6)?

Leaderboards and Statistics
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

We're working on updates for the leaderboard service which we expect to make available later this quarter which will provide more options for queries of previous versions (as well as custom data per row, and support for things like aggregation of points across users for guild-type leaderboards).

Right now, in the statistic definition, you can make any statistic reset on the hour (or day, week, month), but yes, you could also reset it manually if necessary. Past leaderboards are available via S3 once they have been archived, but that process can take some time. What other titles that need to always have access to the last N leaderboards are doing is to use multiple statistics, and "rotate" which one they're using based on time (so, set the start time in Title Data, then use that to calculate the currently active leaderboard). Note that you should not be allowing the client to write any statistics (that API call is off by default for all titles), but rather update the statistics via Cloud Script, so that you can do appropriate checks for cheating there.

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.