Designing your matchmaker to work with allocations is a relatively simple process. However, you should have a good idea of what your player flow will look like beforehand. You should be able to answer the following questions. If you don’t have an answer to one or more of the questions, our experts will work with you to determine the best solution.
Questions about how your matchmaker will work with the Multiplay allocation system...
-
How will your matchmaker group players together for a match?
-
When will your matchmaker group players together? For example, you may want to group players before (or after) allocating a game server.
-
How will you pass the game server connection information to the game client?
-
How will you configure custom requirements, such as maps or game modes?
-
How should the game server end the game session?
-
How will your matchmaker generate and track allocation UUIDs?
-
How will you determine when a game server is ready for allocation?
-
When will you initiate the deallocation process?
The matchmaking workflow example described below uses a lobby to group players on the game server before the game session begins.
Example allocation matchmaker flow...
-
The player requests a game session from the game client.
-
The game client gathers information about the player, such as the region, preferred location, game mode, and map type.
-
The game client sends the information to the matchmaker.
-
The matchmaker determines whether to use an existing game session or to initialize a new game session.
-
If the matchmaker decides to use an existing game session, it passes the session information to the game client, and then the player joins the session. The process ends here.
-
If the matchmaker decides to initialize a new game session, it generates a UUID, then requests and allocation from Multiplay with the /allocate
endpoint. Continue to the next step.
-
Multiplay receives the allocation request from the matchmaker, then selects a game server for the session based on the requirements in the allocation request. Depending on the game mode and map type, Multiplay may reconfigure the game server to match the requested configuration.
-
Multiplay updates the game server state to allocated
.
-
Multiplay runs a few quality assurance tests on the game server to ensure that it’s online and running with the correct profile and configuration.
-
Multiplay sends a confirmation response to the matchmaker.
-
The matchmaker receives the confirmation message, then requests the allocation details from Multiplay with the /allocations
endpoint.
-
Multiplay receives the request for the allocation details, then sends the information back to the matchmaker. The information includes the region, the profile, the allocation UUID, the creation time-stamp, the fulfillment time-stamp, the server ID, the game server socket information.
-
The matchmaker receives the allocation details, then forwards the information to the game client so that it can connect to the game server session.
-
The game client connects to the game server session, and the player enters the lobby.
-
Other players join the lobby until the minimum number of players is met, then the game match begins.
-
The game server sends a heartbeat to the matchmaker every 120 seconds.
-
If the matchmaker receives the heartbeat with the UUID, then no further action is necessary until the game session ends (or the heartbeat fails).
-
If the matchmaker doesn’t receive the heartbeat, then the matchmaker will need to deallocate the allocation UUID with the /deallocate
endpoint.
-
When the game match completes and all the players have disconnected, the game server contacts the matchmaker to report that the match is over.
-
Multiplay receives the deallocation request, then deallocates the game server.
-
Multiplay flags the game server as available for allocation again.