question

emaalouly1 avatar image
emaalouly1 asked

Friends List Display Name

Hello,

I'm building a friends list using playfab and photon, and I've come to the part where I need to display the player's nickname in the list, but due to the fact that playfab needs the playfabId passed as a parameter:

PhotonNetwork.AuthValues.AddAuthParameter("username", PlayFabId);

This overrides the PhotonNetwork.playerName, so when I call FindFriends using photon I need to pass a array of strings that contain the playfabId of the friends. And when I get the result the name I get from the FriendInfo is the playfabId. I can always query the friend's display name from playfab after I get a callback but this is too much of a mess.

Any better ideas of how to get the display name easily? or maybe a better way to even get the friends list with their online status and room status?

P.S.: I use playfab to add the friendship between players, and photon to get the status of each player.

Thanks!

Player DataAuthenticationFriends
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 answered

Why not use Username or Title Display Name for your nicknames? That way, they're returned with the friend IDs when you call GetFriendsList.

For Room status, you'll still need to call Photon, since that info isn't stored in PlayFab.

For login state, because we don't really have the concept of logging out (we're a Web API based service, so there are many scenarios in which a user wouldn't be able to sign out due to lost connection state), we similarly don't have an online status, since it wouldn't be reliable. Getting realtime Room info from Photon would likely be the best way to get that information, for your given game design.

10 |1200

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

emaalouly1 avatar image
emaalouly1 answered

Hello @Brendan Vanous, I think i was using a bad concept to get the display names.

I was getting the playfabId of the friends by using playfab's GetFriendsList, and then i just use these ids to get the friends list from photon since it returns the room state and login state. What i wasn't able to get was the display name, so i will try to get the display name from playfab. But i wish there was an easier integration of the friends list between photon and playfab.

Thanks you for your guidance

1 comment
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 ·

Understood - we'll work with the Exit Games team to see if there isn't some way we can improve that.

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.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]