1 Reply

We are working on an update for the leaderboards system which we hope to make available later this quarter. One thing that update is specifically designed to do is to allow you to store arbitrary data for each entry in the leaderboard.

Making distinct calls to get data for each entry in a leaderboard is not viable, as it would generate an excessive number of calls per client. That, in turn, could result in the title being throttled, which would impact the gameplay experience.

What we would recommend for now is to only request extra data on entries that the player clicks through to see more information on (similar to the "gamercard" systems in consoles).

I have made special cloudscrip function, which I call instead of Leaderboard request. It calls leaderboard internally and iterate all returned users. For each calls it profile and adds nesessery data to responce. So, only 1 call returns all data. But i don't test it for filled leaderboard yet

Again - iterating across the list of players in a leaderboard to take an action on all of them (like query their data) is not going to work. It would result in generating an excessive number of calls, in violation of our terms of service, and would result in getting your title throttled or possibly blocked. We are going to be making extra data per leaderboard entry available in the service later this quarter. For now, the best thing to do would be to only query for extra data per entry if the player actively clicks to view more information about an individual player from the leaderboard.

But it is internal calls inside server. Do you want to say, what requests from cloudscript is restricted? We already have limit in 5 seconds for "CloudScript execution time". I thought, what my script can do anything while it is completing in 5 seconds. I thought about iterating pages with about 10-20 players. Now it takes 0.2s for 3 players.

Can you determine, what exactly is "excessive number" of requests is, please? If this is not restricted for execution time, how it is restricted? And if I can't use many API calls, what script can do for hit that 5 second limit at all?

In general, for Cloud Script, I would recommend no more than 1-2 Server API calls per second of execution time, to be safe. So, using your example above, if your goal was to show a leaderboard, and have just the extra info for the top player, or top 3 players, that wouldn't be a problem.

No, my goal is far from top3. I'm building clan system and using leaderboard as clan leaderboard/list. So I put special statistic to clanleader, made leaderboard from clanleaders, and when requested clan list, I take leaderboard->userId->user_data->groupId->group_data for all users on page. In another function I have operation with clan and I need to get data of all (10) group members. If now you tell, what I can use only 3 servercalls per request - it's catastrophic.