Matchmaker integration

This section briefly introduces matchmakers and provides loose guidelines around how matchmakers integrate with the Game Server Hosting service.

A matchmaker controls finding players, grouping them together, and placing them on a game server for a game session. Matchmakers and often used in unison with Game Server Hosting to create a multiplayer experience. Game Server Hosting comes into play in the last stage: placing players on a game server.

At its core, matchmakers must be able to:

  • Find players
  • Group players
  • Find an appropriate game server
  • Send grouped players to the game server

Matchmakers might also be able to backfill, which involves sending players to a game server after a game session begins to replace (backfill) players that left the game session.

Matchmaker lifecycles

The lifecycle of a matchmaker varies drastically depending on the type of game, implementation of the game, and requirements of the game. That said, the most common lifecycle patterns of a matchmaker fall into two categories:

Session-based games

Session-based games are games in which the game session is short-lived (an hour or less). Game Server Hosting works best for these types of games because it prioritizes effectively finding game servers for matches in a way that saves money and optimizes the player experience.

Game types that often use short-lived sessions include:

  • First-person shooter (FPS) games
  • Multiplayer online battle arena (MOBA) games
  • Battle royale games

Long-lived games

Long-lived games are games in which the session lasts an hour or more (possibly in the range of days or weeks).

Game types that often use long-lived sessions include:

  • Survival games
  • Real-time strategy (RTS) games
  • Massively multiplayer online role-playing (MMO) games

Matchmaker integration options

The integration point between Game Server Hosting and a matchmaker is flexible, but the integration patterns fall into two categories based on how you manage game session allocations:

Exit after each session

In this pattern, the matchmaker allocates a server for a match and sends the players to the server. After the match completes, the build executable exits cleanly, Game Server Hosting detects the clean exit and automatically deallocates the server, freeing it up for the next match.

The advantages of exiting after each session include:

  • It’s simple to implement. All the matchmaker needs to do is request an allocation and send players to the server.
  • There’s no need to worry about cleaning up the server state because it exits after each match.
  • There’s no need for the matchmaker to worry about deallocation calls because it happens automatically.
  • There’s less need to worry about memory leaks because the process starts fresh for each match.

Manually deallocate after each session

In this pattern, the matchmaker allocates a server for a match, sends the players to the server, waits for the match to complete, then deallocates the server (without restarting the process).

The advantage of this pattern is that you get much faster start-up times, and the server is ready to accept players immediately after each match because you don’t need to restart the build executable process.