Matchmaker ticket flow
Understand how tickets move from creation through matching to server allocation.
Read time 2 minutesLast updated 5 days ago
This Matchmaker flow takes you through the creation of a matchmaking ticket to the allocation of a server for the match created and the ticket assignment.
Flow of a ticket from creation to allocation.
- When a player launches the game, the game client authenticates using the Unity Authentication Service.
- Once the player has selected their game parameters (such as game mode), the game client creates and sends a ticket to the Matchmaker service.
- Matchmaker matches the ticket with other players' tickets and requests a game server allocation from your preferred game server hosting service to host the match by calling the Cloud Code allocation function configured for that pool. If supported, the allocation can be passed information about the match made via matchmaking results.
- In the request to the Cloud Code polling function, Matchmaker passes the data returned by the allocation function to gather information about the allocation. The polling function can return one of three states: ,
allocated, andpending. If the polling function returnserror, Matchmaker repeatedly calls the polling function until it returnspendingorallocated. Iferroris returned, then Matchmaker assigns an error to all the tickets in that match.error - After the polling function returns , the server starts. The server retrieves the matchmaking results from either a provider-specific endpoint, if supported, or the Matchmaker's matchmaking results endpoint to get the information on who the players are and their distribution across the different teams.
allocated - Once the server is allocated, Matchmaker updates the tickets in the match with the connection information.
- The game client polls the Matchmaker service every second to get the ticket status. Once the server connection information is added to the ticket, the game client retrieves it, connects to the server, and joins the match.