Sign In Register

How can we help you today?

Start a new topic
Answered

Load next page of scores in a Leaderboard ?

Hey,


We want to display a leaderboard that contains all the scores of the players - all of them, not just X scores centered around the player. Obviously we aren't going to show all the scores at once (data usage, etc), so we first fetch the 50 scores centered around the player.


Then we would like to fetch separately more scores above and under the player, as he requests it (if he scrolls to the bottom, we will dynamically load more scores to the bottom, and vice versa for the top).


I browsed the API again and again but did not find any API call for doing that. I only found the AroundMeLeaderboardRequest that only loads the scores AROUND the player, and the LeaderboardDataRequest that only loads scores at the top of the leaderboards. Is it possible to load more scores like I just explained ?


For example, with the Google Play API for Leaderboards, you load X scores (25 at most) centered around the player. Then you can call a method asking to load more scores either above or under, that will return 25 more scores above or under. Is that possible with the GameSparks Leaderboards ?


Best Answer

Hi,


You can simply do this with the LeaderboardDataRequests offset parameter. You can load an initial set of entries and then send the request again with the appropriate offset to give you the next set of results. Does that sound like what you need here ? 


Regards,

Liam

1 Comment

Answer

Hi,


You can simply do this with the LeaderboardDataRequests offset parameter. You can load an initial set of entries and then send the request again with the appropriate offset to give you the next set of results. Does that sound like what you need here ? 


Regards,

Liam


1 person likes this
Login to post a comment