question

Canberk Soner avatar image
Canberk Soner asked

Comparing Lobby, Party and Entity Groups

Hello,

I need help understanding the intended use cases for Lobby, Party and Entity Groups features. There seems to be some overlap between them. What are the main differences? Where should we use which one?

Best,

apissdksentities
10 |1200

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

Neils Shi avatar image
Neils Shi answered

PlayFab Lobby is a service to create a temporary grouping mechanism for players to play games together. You can create a lobby and invite your friends to join, then you can matchmaking together. The Entity groups can simultaneously serve many purposes within your game. It can be utilized by your game to create guild and clan (which can be long-standing) interactions within your game. For more detail, you can refer to Entity groups Examples. Azure PlayFab Party is a low-latency chat and data communication solution for cross-platform and cross-device multiplayer games. You can refer to Party Features for more detail. Please note that, if you want to use Party, you need to download Playfab Party SDKs first. You can choose to use them depending on the specific functionality you want to implement.

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.

Canberk Soner avatar image Canberk Soner commented ·

Hi, unfortunately this doesn't really answer it. Since entity groups can serve many purposes, why should I use Lobby? Also, doesn't Lobby also support chat trhough realtime messaging? If it does not, what's the difference between Lobby and Entity Groups then? I'm pretty sure most games require chat in their lobbies. And if Lobby does support chat, what's the purpose of Party then?

0 Likes 0 ·
Neils Shi avatar image
Neils Shi answered

Since entity groups can serve many purposes, why should I use Lobby?

Fundamentally, entity groups have been created as a solution for guilds. And the Lobby is used to create a temporary grouping mechanism for players to play games together. It is used seamlessly with PlayFab LiveOps and backend services. This includes PlayFab Matchmaking, PlayFab Multiplayer Servers. You can refer to Use Lobby and Matchmaking Together for more detail. So, the Lobby is more suitable for temporary grouping mechanism than entity groups.

Also, doesn't Lobby also support chat through realtime messaging?

If you mean the real-time notifications, it doesn't provide chat function. When there are updates to Matchmaking or Lobby resources in the cloud, the client SDK will forward notifications in real-time to all connected clients subscribed to those resources. For more detail, please refer to Lobby and Matchmaking real-time notifications.

I'm pretty sure most games require chat in their lobbies. And if Lobby does support chat, what's the purpose of Party then?

Currently, PlayFab Lobby doesn't Provide such function. Therefore, you can use PlayFab Lobby with Party together. And party not only includes chat functions, it can also be used for data communication and other functions.

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.

Canberk Soner avatar image Canberk Soner commented ·

Thanks for the detailed answer, I'll check the docs. But just to confirm, the part where you said that Lobby SDK can forward matchmaking and lobby resource updates to other clients, does this include when someone joins a lobby, requests to join a lobby, leaves etc.?

Does Lobby SDK provide any custom data transfer between lobby member clients? Let's say the lobby leader changes some setting related to our game, how would I transfer this data to others?

0 Likes 0 ·
Neils Shi avatar image Neils Shi Canberk Soner commented ·

But just to confirm, the part where you said that Lobby SDK can forward matchmaking and lobby resource updates to other clients, does this include when someone joins a lobby, requests to join a lobby, leaves etc.?

Yes, When a client connects to receive real-time notifications, they'll open a new WebSocket connection to receive notifications and listen for change events. When a client creates a lobby, joins a lobby, starts listening for invitations, or creates a Matchmaking ticket, the connected client will subscribe to a Lobby or Matchmaking resource to listen for changes.

Does Lobby SDK provide any custom data transfer between lobby member clients? Let's say the lobby leader changes some setting related to our game, how would I transfer this data to others?

Lobby owner call UpdateLobby to set LobbyData. The LobbyData is visible to all members of the lobby and only lobby owner can modify it.

1 Like 1 ·
Canberk Soner avatar image Canberk Soner Neils Shi commented ·

Then what about something like sending data for changes to a lobby member's in-game character, for example? They equip a new weapon or skill or skin and the other players in lobby should see this. Is it intended to use Party SDK for this purpose?

I also see that in "Update Lobby" there are properties for "member data." Is this intended to be called by lobby owner only or does it support being called by multiple member entities? (As in, every member updating their own member data simultaneously)

I implemented "lobbies" using Entity Groups and SignalR (following PlayFab samples on GitHub basically) but this was before Lobby SDK was released. We were advised previously that this structure was fine but we should take care not to leave "unused" entity groups (which we solved with a clean-up task).

0 Likes 0 ·
Neils Shi avatar image
Neils Shi answered

Then what about something like sending data for changes to a lobby member's in-game character, for example? They equip a new weapon or skill or skin and the other players in lobby should see this. Is it intended to use Party SDK for this purpose?

You can use the API UpdateLobby(modify MemberData)to complete it. Other players in lobby can use GetLobby to see the change. And the Multiplayer SDK has real-time notifications to let players know the lobby changes. When the event PlayFabMultiplayer.OnLobbyUpdated is raised, they can use Lobby.GetMemberProperties to check the change in member. Also, you can use PlayFab Party to tell other players that something has changed.

I also see that in "Update Lobby" there are properties for "member data." Is this intended to be called by lobby owner only or does it support being called by multiple member entities? (As in, every member updating their own member data simultaneously)

The MemberData can only be updated by its owner. The lobby owner can't modify other players' MemberData. The members can update their own MemberData simultaneously. Also, when players are ready to join the lobby via API JoinLobby, they can already modify their MemberData.

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