Matchmaking puts players together and starts a server for their match. You set the rules once, in a queue. Your game does the rest through lobbies.

Before you start

  • A build with status ready.
  • The Pro plan. Queues, lobbies and matchmaking are Pro only. See Plan Limits.

How it works

  1. A player creates a lobby from your game. Friends join it.
  2. The lobby’s host (the player who created it) enters the queue.
  3. Simpl looks for other lobbies in the same queue that fit your rules.
  4. When there are enough players, Simpl starts a server and tells every player where to connect.

1. Create a queue

In the dashboard: open the Queues tab, click Create queue, fill in the form, and click Create queue again to save it. With the API, using your server key:
These fields are required: Optional: host_leave_behavior says what happens when the host leaves a lobby. "promote" (the default) makes another player the host. "delete" closes the lobby.

2. Add rules (optional)

Rules go in matchmaking. They read the player state: a small set of values each player sends when they join a lobby, such as a skill rating.
matchmaking.timeout is how many seconds Simpl searches before giving up. The lobby then goes back to waiting.

Teams and roles

For a game like 1 hunter against 4 survivors, list how many of each role each team needs. The match size is then the total, 5 here.
Each player says which role they want with role in their state. A player with no role can fill any spot.

3. Send player state

Players send their state when they create or join a lobby:

4. Find a match from your game

Your game calls these with the client key (ck_live_...) in the api-key header, and the player’s ID in the x-player-id header. The player ID is your own ID for that player.
  1. Create a lobby: POST /v1/lobbies with name, region, your queue_id and the player’s state.
  2. Other players join by the lobby’s ID or its invite code.
  3. The host enters the queue: POST /v1/lobbies/{lobby_id}/queue.
  4. Wait for the server. Simpl sends a server_ready event when the server is up, with its network_ports. Players connect to host:external_port of the port named game. You can also read the lobby (GET /v1/lobbies/{lobby_id}) every few seconds until its server has status running.
See the API reference for every lobby call.