Matchmaker
The Rivet Matchmaker is a casual matchmaker optimized to get your player connected to your game server in under a second in the optimal region & lobby.
Configuration
See the rivet.yaml reference for the full list of matchmaker configuration options.
Integration
To integrate your servers to the Rivet Matchmaker system, you need to call these three endpoints in your server code.
- matchmaker.lobbies.ready: Notifies the matchmaker that the server is ready to accept players
- matchmaker.players.connected: Notifies the matchmaker of a player connection while confirming the connection’s legitimacy
- matchmaker.players.disconnected: Notifies the matchmaker of a player disconnection
And don't worry about notifying the matchmaker if your lobby closes or crashes, that gets taken internally by the Dynamic Server system. Although if you want to manually tell the matchmaker to stop letting in new players, you can call the matchmaker.lobbies.setClosed endpoint.
Connecting to lobbies
Once integrated, you can call the following endpoints to find and join available lobbies in your client code.
- matchmaker.lobbies.find: Finds an available lobby and grants a player token to connect
- matchmaker.lobbies.join: Given a lobby’s id, grants a player token to be used for connection
If you want the client to be able to create a whole new lobby (for things like private games), you can also use the matchmaker.lobbies.create endpoint.
Getting other lobby info
Additionally, you can make use of these endpoints to get more information about your game’s lobbies.
- matchmaker.regions.list: Returns listing of all regions available in game
- matchmaker.lobbies.list: Returns listing of all the lobbies linked to the matchmaker
- matchmaker.players.getStatistics: Returns player count statistics by region and game mode
The Rivet Matchmaker is tightly integrated with Dynamic Servers to automatically boot lobbies on-demand when players need them. Read more about how Rivet Dynamic Servers operates your game servers here.