Blog

Latest news and updates from the PlayFab developers

by JamesGwertzman 2014-08-19

New Feature Update: Leaderboards & Data Sharing

One of the benefits of using a hosted solution like PlayFab is that we are continually adding features and making improvements based on your feedback. Today we are describing two new features: Leaderboards, and data sharing between players.

New Feature: Leaderboards and Statistics

Leaderboards let players compare their skills and progress against other players, encouraging them to play "just one more round" to try to beat someone else's score.

Our Leaderboards are powered by numerical player "stats" which are stored in a player's account. There is no limit (for now) on the number of "stats" which you can define for your game. To create a new stat, just implement it and we will automatically create a new leaderboard for each new stat.

For now, stats can only be updated by server code, because game clients are easily hacked and client-side API calls can be easily spoofed. We know that some games don't care, however, and so client-side stat tracking is coming soon.

To store a stat, use the UpdateUserStatistics API. You can update one or more stats with a single call. Stats can also be read using the GetUserStatistics API either on the client or a server.

To retrieve a leaderboard from the game client, use the GetLeaderboard and GetLeaderboardAroundCurrentUser APIs. Game servers can use GetLeaderboard and GetLeaderboardAroundUser.

Coming soon: Social Leaderboards that automatically filter the leaderboard to only display a player's friends.

New Feature: Sharing Data Between Player Accounts

Game titles can now share information more easily between players, to drive multiplayer gameplay and social sharing features.

For title-specific customer player data, we've added the concept of "public" data. Now, when player data is written using UpdateUserData (clientserveradmin) and UpdateUserReadOnlyData (serveradmin), that data will be tagged as either "public" or "private" (default) depending on the UserDataPermission specified.

We have updated GetUserData and GetUserReadOnlyData APIs with an optional PlayFabId. If you specify the PlayFabId for another player you will receive back any public info stored for that player.

We have also updated the GetAccountInfo API with an optional PlayFabId, so one player can query for basic account information of another player, including the Title Display Name.

If You See Something, Say Something

Do you have a key feature you need enabled for your title, which you're not seeing in the current PlayFab API documentation? Let us know in our forums, or if your feature is already there, vote for it so we know you also need it. Your input is key to how we make sure our service provides the features developers need, so please do let us know!