question

Paul Pacheco avatar image
Paul Pacheco asked

group invite polling

I am trying to implement guilds with playfab.

Let's say player "A" invites player "B" to a guild.

Player "B" will have to call `ListMembershipOpportunities` to realize he has a pending invitation correct?

How often should "B" call this function 10s, 30s? is there a limit I need to worry about?

10 |1200

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

1 Answer

·
JayZuo avatar image
JayZuo answered

Yeah, if "B" wants to know all outstanding invitations or group applications, he will need to call ListMembershipOpportunities. But I don't think you will need to poll this every 10/30 seconds. This method should be called when a player check his invitations/applications status explicitly.

When "A" invites "B", you can send a notification to "B" so that "B" can realize he has a pending invitation. For Android/iOS application, you can take advantage of Push Notification. And PlayFab will also provide a Two-way Connectivity feature to send a custom event to individual players via a server API later in Q4. For more info, please see PlayFab Roadmap: 2018 Q3 and Upcoming Roadmap: 2018 Q4.

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

Paul Pacheco avatar image Paul Pacheco commented ·

My players are usually walking around the world and I am not expecting them to have to check if they have invitations, I would like guild/party/friend/trade invitations to pop up on the screen.

Push notifications only work on Android/iOS, not for WebGL or desktop games.

The two-way connectivity sound like the ideal solution. If it is ready by end of Q4, that will work for me.

But for now, about the original question: is it ok to ListMembershipOpportunities? is there a limit I need to worry about?

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ Paul Pacheco commented ·

Polling is always not recommended. You may call ListMembershipOpportunities based on your players' actions (eg. launch your game, enter guild/party/friend page/scene...). Anyway, back to your original question, it should be ok to call this function every 30s as long as those calls are came from different players around the world.

1 Like 1 ·

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.