Idea

fabian-kuhn@gmx.de avatar image
fabian-kuhn@gmx.de suggested

GetFriendList / GetLeaderBoard with additional UserDataKeys and GetUsersData

Hello,

i would suggest an additional optional KeyValue parameter in the GetFriendList and GetLeaderBoard API, which says if u want to retrieve specific keys from their UserData (if available). For example if the players saved their avatars or locationflags in their userdata, this would be a good way to get them (maybe set to MaxCount =10 or sth for friends and leaderbaord).

Or an alternative would be a GetUsersData, which takes more than one PlayFabId.

and btw, on your Homepage, if u scroll down to your footer and click on "Forums" ull get linked to https://api.payfab.com/community which is not avaiable :)

 

Regards

 

10 |1200

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

6 Comments

·
tim@ninjatertle.com avatar image
tim@ninjatertle.com commented

I really need these suggestions, especially

  • Or an alternative would be a GetUsersData, which takes more than one PlayFabId.

I would really like the ability to do this.

10 |1200

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

fabian-kuhn@gmx.de avatar image
fabian-kuhn@gmx.de commented

A small addition why this feature is so important:

- without it, any external service cant be used with playfab

an example: asynchronous rooms with your own server

you save the playfabid in the room info and u need to save all needed infos redundant, for example avatar, name, namecolor etc. if u could use GetUsersData, u can only save the playfabid and retrieve the needed infos with 1 call to the playfab service

10 |1200

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

brendan avatar image
brendan commented

When asking for features, it's really best to focus on the actual gameplay behavior you're looking for, rather than a specific implementation, so that we can work out the best way to meet the need.

The issue with the change to GetUserData (or a new API, GetUsersData) proposed is that it would mean, on the service side, scanning the table multiple times - once for each player - since the player's ID is the key. That's no more or less efficient that just calling GetUserData multiple times in a burst, and collecting the results. Which is okay, so long as it's only a few calls, and this is done infrequently (again, the target should be that you make less than one API call per second averaged over the lifetime of the user's session).

Another way to approach this that is currently possible would be to use Shared Group Data. In particular for asynchronous rooms (such as using Photon Cloud), you would record all the necessary info in a single Shared Group Data, so that you can retrieve all of it with one API call. There's a fairly extensive discussion on asynchronous games in PlayFab using Photon where we talk about this here: https://community.playfab.com/hc/en-us/community/posts/207129407-Persistent-turn-based-games-.

10 |1200

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

fabian-kuhn@gmx.de avatar image
fabian-kuhn@gmx.de commented

Thank you for your response.

Actual gameplay behaviour:

Each user has several additional information saved in his Internal data ( isPremium, Location, Avatar ..), when i want to show a leaderboard or friendlist, i want to show those informations for each player in that list. saving those information in shared groups woulndt be a pretty solution, since the avatar for example can be changed at any time and then i would need to keep track of all shared groups where that specific player has an avatar. Firing GetUserData for each player would end up in a big API call burst, which is not in the fair use policy.

A solution to retrieve specific userdata keys from multiple accounts would help out here.

Another Example:

We handle our gameroom management on our own servers and we only save the PlayFabIds there (and game related data).

When we want to show the rooms to the user, we want to show the avatars from the "enemies". 

 

Currently, to solve the problems above, we have to had to create an additional datatable with the collumns PlayFabId, Avatar, Name. Saving data redundant (on playfab and our own server) means that we have to keep everything in sync, but we are able to retrieve the avatars for more than playfabid at once. Again, a playfab solution would be appreciated.

Regards

10 |1200

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

tim@ninjatertle.com avatar image
tim@ninjatertle.com commented

Sure, a couple of behaviors I want, well need, for my upcoming title.

  1. Non-unique player names - my game requires display names to not be unique so they're either stored in UserData or as a CharacterName (not decided yet), therefore when I want to request a friends or a clan list, I have to process 50 separate requests to get all the player names.
  2. More stats showing on leader board. Let's take a popular game, clash of clans. Their leaderboard that shows trophies as well as attacks won, attacks lost, player level and user clan. My employer wants something similar on the leaderboard, yet I could only get the playfabid and the 'trophies' and then would have to do a getuserid on every user to get the attacks won/lost, player level and the uses clan. It seems super inefficient.
10 |1200

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

brendan avatar image
brendan commented

For the first item, I would have to recommend using Shared Group Data to have collections of assorted info across players - use their PlayFab ID for they Key, and then their name, etc., as the Value. This does mean you're limited in the number of total users in the grouping (100 by default, and contact us for info on the cost structure if you need more). Also, see the next item.

For extra columns of data on leaderboard entries, that's something we have on our backlog to support, and it could be the solution to your first item, depending on your requirements. We don't have a date for that yet, but the original feature request for it is here: https://community.playfab.com/hc/en-us/community/posts/206730237-Request-Custom-Fields-in-Leaderboard-Results.

10 |1200

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

Write a Comment

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

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.

Related Ideas