This is in order to send information out to all the players in the match
First of all, it might not be a good idea to get the data of all the players using Cloud Script, there are limits for the number of API requests issued in a Cloud Script function, hence it will certainly hit the limit if the number of players in a match is huge. A better way to do this would be enabling PlayFab SDK for your servers to call server APIs to get the data of those players, which would give you far more flexibility than using Cloud Script. And please also note that your server should manage a list of PlayFabIds of those players for the APIs to consume.
Some context:
Each match consists of only two players. Turn based async game. Players need to submit a request to end their turn, server has recieved information from both participants, I would like to send out data to the players in the match.
I have set up the cloud request on the client. Is there functionality in the server to send information to a group of players? I really only need the PlayFabID of the players in the match, hence maybe using the MatchId to locate the match and get the members from there.
Been looking through the documentation, just having a hard time finding what functions I need on the cloud scripting side of things and this seems like it is something simple. Can you point me in a direction?
Hi @Malik Allen,
Based on your description, it looks like you are not using a dedicated server for each match, and the server you talked about is actually PlayFab, is that right? If that's the case, then "the functionality in the server to send information to a group of players" is actually the functionality for PlayFab to send information to players, which is more like a Pub/Sub system.
PlayFab does offer such functionality: PubSub, allowing PlayFab to send information to game clients. However, this is currently in Private Preview, only restricted to select titles. If you are interested in trying it, please contact us at helloplayfab@microsoft.com
Regarding some directions on this, you may find this thread helpful: Persistent turn based games?
Thank you, that clears things up. I will reach out to the email to find out more about PubSub. For the time being I will be using Photon inside of the to communicate between players.
Is there an ETA on the PubSub?
Thank you
3 People are following this question.