question

vbalakrishnatimuz avatar image
vbalakrishnatimuz asked

Leaderboard get my Rank in all Global Players

Hi Brendan,

We would like to get current player rank in all Global players (We don't require other players data or ranks)

As we have seen getLoaderboard data will fetch all information about players in that leaderboard.

is there any other method availble like getPlayerRank(bool inAllPlayers) just return Rank (int) value like Rank(45000) in 1000000 players.

We are not expecting too much data.. just integer based on his position.

Please suggest us solution.

Thank You

Balakrishna

Leaderboards and Statistics
2 comments
10 |1200

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

cqatproject avatar image cqatproject commented ·

@Brendan Thanks for the reply, I now add my comment to the main thread.

Is there any update about this matter? As the other developers experienced (and me as well) that GetLeaderboard and GetLeaderboardAroundPlayer returns different results, if the player has the same statistic value with the other players.

I also want to get the current player rank from the global players. When I used GetLeaderboardAroundPlayer it gaves me a different result as with GetLeaderboard.

Thanks you.

0 Likes 0 ·
brendan avatar image brendan cqatproject commented ·

Actually, what I was saying was that this thread is specifically about getting the count of all players. What you're asking is a very different question, so to prevent confusion, I was suggesting starting a new thread, or finding a different thread that is about the values/player positions. This one, for example, would be a more appropriate place for your question: https://community.playfab.com/questions/20111/getleaderboardaroundplayer-returns-different-posit.html

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

The leaderboard data currently contains the position of the player in the overall list. I think what you're asking (and please correct me if I'm wrong) is that you want the total number of players in the leaderboard. That's not currently part of the leaderboard system, as computing the number of players with a reported score on a specific statistic would require iterating across that statistic each time, since a player could report a score at any time.

We'll be updating with more tournament-specific functionality later this year, which will include new ways to work with leaderboard data, such as being able to filter on geolocation and have separate cohorts per leaderboard. Please keep an eye on our update announcements in the Game Manager for more information on this.

12 comments
10 |1200

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

vbalakrishnatimuz avatar image vbalakrishnatimuz commented ·

I just want to show player rank among all players of game.

Example: You are at 45,000 Rank out of Total Players 100,000.

Thank you.

1 Like 1 ·
brendan avatar image brendan vbalakrishnatimuz commented ·

Thanks, as I was saying above, the total number of players in the leaderboard is the part that is not currently available. We'll be adding that in a future update.

0 Likes 0 ·
andrearossini avatar image andrearossini brendan commented ·

Hi, Any news on leaderboard total player count?

We was thinking about create a fake player and set it's statistic value to -1. All other players will have values >= 0, so the position of that player will be the player count.

Is this possible in your mind?

0 Likes 0 ·
Show more comments
mak avatar image mak vbalakrishnatimuz commented ·

try this api GetLeaderboardAroundPlayer you'll get your rank in this result. what ever its it will give some records as per parameters like 5 record and your entry will be there so u can find your position from all players.(it will give 5 records which nears to you including you)

0 Likes 0 ·
vbalakrishnatimuz avatar image vbalakrishnatimuz commented ·

As you mentioned..

The leaderboard data currently contains the position of the player in the overall list. (this list is limited right?)

We want position of the player in the overall list globally not in limited player..

Example I just want to get my Rank among 1 Million Players. not the data of all 1 Million players.

Thank You Brendan,

0 Likes 0 ·
brendan avatar image brendan vbalakrishnatimuz commented ·

No, that's not limited. If you have 100,000,000 players who have a statistic, each player has a position in the leaderboard, which is returned as part of the leaderboard data. So, for example: https://api.playfab.com/documentation/client/method/GetLeaderboardAroundPlayer. If a given player is in position 939,173,376 in the leaderboard and you use that API to request him and the 20 players around his position, you'd get their relative positions in the leaderboard. If that's not what you mean, can you please clarify what the data is that you're looking for?

0 Likes 0 ·
cqatproject avatar image cqatproject commented ·

Is there any update about this matter? As the other developers experienced (and me as well) that GetLeaderboard and GetLeaderboardAroundPlayer returns different results, if the player has the same statistic value with the other players.

0 Likes 0 ·
brendan avatar image brendan cqatproject commented ·

Could you please open a new thread for this (or add this to one that's on that topic), so that we're not conflating separate issues? This question thread was specifically about wanting to get the total number of players in the leaderboard.

1 Like 1 ·
Daniel de Castro Ribeiro avatar image Daniel de Castro Ribeiro commented ·

It would be SO helpful to have the simple information of how many players have a specific statistic. Without grabbing or iterating any data. If each specific Leaderboard is a dictionary, for instance, I would only need it's Count so we could code from our end to get the percentage in which this player resides. (Better 10%, for instance.)

It's really that simple: the size of the Leaderboard.

0 Likes 0 ·

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.