I'm using PlayFab to host a 1v1 turn-based custom game server, integrated with PlayFab's player management and matchmaking. So far I've been auto-allocating game servers through the matchmaker, but due to the limited sessions per VM (60-port restriction), I need to move to multiple games per server instance. I was hoping someone could verify or correct/improve my planned flow for this:
1. Client (Unity): Logs in, joins matchmaking queue, gets matchID, executes cloudscript with matchID, gets server details and connects
2. Server Allocation: Cloudscript checks for servers tagged as accepting clients, if none spins up a new server. In either case, passes details to client
3. Game server: Tags itself as accepting clients until a certain number of clients (cumulative, not concurrent) have joined, then removes the tag and shuts down after games are over. When client connects, verifies matchID, starts a new game once two players with same matchID have joined.
A few questions in this regard:
I - What is the best way to let Playfab know that a player is currently in a game? Is UpdatePlayfabPlayers sufficient or should I Register every game with the matchmaker?
II - The GetMatch API needs an entitytoken - is this automatically provided on the server side C# API if I leave the AuthenticationContext field in the GetMatchRequest empty? Or do I need to create an authentication context using the user's details (which then I'm guessing the client will have to send to the server through my messaging system?)
Glad for any thoughts, inputs and discussions!