question

samirduran avatar image
samirduran asked

Deleting a group automatically

I want to add a feature where my players can create short-lived groups to make quick competitions. After 24 hours, I would like the group to be automatically deleted. Is there a way to develop such functionality? I thought of scheduling a cloudscript once a day to verify all groups and delete those with more than 24 hours of being created but I can't find a way to list all the groups.

CloudScriptentities
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

Currently, PlayFab does not provide the ability to automatically delete groups, and there is no way to list all groups. Considering you want to create short-lived groups to make quick competitions for players, you may use PlayFab Lobby. Azure PlayFab Lobby is a service to create a temporary grouping mechanism for players to play games together, and client created lobbies will be automatically deleted when all members are left.

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.

samirduran avatar image samirduran commented ·

Thanks @Neils Shi ! I see that the Lobby feature is exactly what I need. I just have a couple of additional questions: 1. I plan to have this feature as a way of grouping for asynchronous actions between players. They will gather in the lobby and make an asynchronous participation. Are lobbies still a good fit? 2. I read here that lobbies only last for 15 minutes without connections. Will that mean that if no player participates in the lobby during this time, will it be deleted? 3. Is there a way of listing all the lobbies I've created or joined?

0 Likes 0 ·
Neils Shi avatar image
Neils Shi answered

I plan to have this feature as a way of grouping for asynchronous actions between players. They will gather in the lobby and make an asynchronous participation. Are lobbies still a good fit?

What do you mean by "grouping for asynchronous actions between players"? Could you tell us more details about it?

I read here that lobbies only last for 15 minutes without connections. Will that mean that if no player participates in the lobby during this time, will it be deleted?

After my tests, currently when there is no player participates in the lobby for more than 60 minutes, the lobby will be automatically deleted.

Is there a way of listing all the lobbies I've created or joined?

Yes, you can use FindLobbies API with Filter to implement it. For more info, please refer to Lobby - Find Lobbies - REST API (PlayFab Multiplayer) | Microsoft Learn. The following example request code shows how to find the lobbies I've created or joined: { "Filter": "lobby/amOwner eq 'true'", //fine the lobby I’ve created "Filter": "lobby/amMember eq 'true'" //fine the lobby I’ve joined }

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.