Requirements to use direct integration of matchmaking and servers
In order to allocate a multiplayer server from matchmaking, you first need to configure a build and deploy it. You can optionally create a build alias and use that as well. Build aliases are preferred as they allow more flexibility for your title usage. Follow the link we have provided here to get more information about Multiplayer Server builds and Multiplayer Server build alias Matchmaking also needs a region selection rule to be added to the queue, so that matches can be allocated in the optimal region for the build. The latency measurements passed into the region selection rule should match the regions where the build is active. For more information on how to pass attributes to a region selection rule, see Region selection rule.Activating server allocation for the queue
In order to enable server allocation for a queue, you need to enable the checkbox for Enable server allocation on the queue config page. Once you’ve enabled that, choose either Build alias or Build Id. Choose the correct value from the drop-down to be used by the queue. Once you enable the feature, matchmaking attempts to allocate a server for all the matches created within the queue. The following example is what the config for a queue with multiplayer server integration should look like using a Build Id.GetMatch call for a queue with server allocation
enabled.
When a region of your build runs out of capacity, matchmaking is not be able to allocate matches for the queue in that region. Matchmaking will keep retrying the allocation until the ticket expires. To increase multiplayer capacity, refer to Accessing increased core limits and additional Azure regions
Information passed to the game server
Here is the list of information that matchmaking passes to the server.- SessionId - The
SessionIdfor the server is equal to the MatchId for the match. - InitialPlayers - This value is set to the list of members in the match. The list of players can be read in the game by using the GSDK.
- PreferredRegions - This field is set to the
RegionPreferencesfield from the match. The game server service chooses an appropriate region for the server from this list.
ReturnMemberAttributes header to true.
We recently enabled the passing of queue name during server allocation. This feature is in preview and you can read more about it here.
