In order to run a multiplayer game, you need the following components:
- Players running the game client. The game client is the game the player installs on the console, PC or mobile.
- A game server that runs at a different location from the game client. The server is what the player connects to in order to play their multiplayer game session.
In addition to running game clients and game servers, multiplayer games can optionally implement a matchmaking component, which is the action of grouping players together for a game session.
While you can use alternate matchmaker solutions with Multiplay, Unity offers a matchmaker service built to simplify the design and operation of grouping players together, and is fully integrated with Multiplay's scaling platform.
Players running a multiplayer game need their game client to connect to a game server so they can play a game session. The following diagram demonstrates a typical matchmaker process to accomplish this connection.
- Players connect to a matchmaker to place them into a game session. In an allocation-based process, the matchmaker groups together players to give them the best possible game session based on criteria like skill and location.
- Once the matchmaker identifies a suitable group of players for a game, it needs to find a game server to host the session. The matchmaker calls Multiplay's API to find the best available game server.
- Multiplay finds the best game server to satisfy the request from the matchmaker, and sends these details back to the matchmaker.
- The matchmaker provides these details back to the game client.
- The game client can now use the received information to connect to the game server.