question

Younes Ouhbi avatar image
Younes Ouhbi asked

Extra data per leaderboard entry

Hi there and thank you for making PlayFab accessible to small teams and indies.

In my game, I need to show the following data per leaderboard entry (top 10 only):

- Player display name

- Player gender

- Player country

- Player city

- Player vehicle properties (id, color, accessory id... in order to be able to render it)

Should I add the gender, country, city and vehicle properties as other statistics? If so, is there a possible way to retrieve all those in one single call to GetLeaderboard for the top 10?

More philosophically, if I may, why this idea of statistics instead of regular leaderboard entries with free simple meta data per row? I have evaluated MANY services and can't help but notice PlayFab being the only one to have this idea of linking statistic with leaderboard entry?

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

I've removed the previous response, as it may have caused some confusion. To be clear, the way to do what you describe is by using the player profile. One call to the leaderboard can return all the data you need (iterating across players in a leaderboard to get additional data would generate excessive API calls per client, which could push your titles usage into a space where it could need to be throttled for performance reasons). This tutorial specifically describes how to use the profile for this purpose:

https://api.playfab.com/docs/tutorials/landing-tournaments/leaderboard-profile

In addition though, the new Entity statistics and Object data models will shortly provide for arbitrary data to be returned as part of a leaderboard call, as well. Keep an eye on the News page in the Game Manager for more on that as we roll it out.

3 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.

giorgiotino avatar image giorgiotino commented ·

Any updates on this matter? We are actually following @Brendan's advice to retrieve the Profile and Statistics along with the GetLeaderboard API request, and since we only need to know each player's level (and we have a Statistic for that) we have all the data we need - but i would be definitely easier if we could get, say, each player's specific entity Object along with the Profile.

0 Likes 0 ·
brendan avatar image brendan giorgiotino commented ·

Please keep an eye on the roadmap page (PlayFab Roadmap - PlayFab | Microsoft Docs) and the Game Manager News page for more info on new features as they're rolled out. The updated statistics service required additional work which has delayed its roll-out, but we are working to provide it to all titles as soon as possible.

1 Like 1 ·
giorgiotino avatar image giorgiotino brendan commented ·

I'll keep an eye on that page, thanks!

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.