Crash Course
Step 1: Setup project
Create a game on the Rivet Dashboard
Visit the Rivet Dashboard to create a new game.
Install the Rivet CLI
Follow instructions here.
Initialize the project
Open your project’s directory in a terminal and run:
This will guide you through setting up your project with Rivet.
Write a Dockerfile
for your server
You’ll need a Dockerfile
to build and run your game server.
Step 2: Integrate Rivet Matchmaker
Install the Rivet library
Update your client
Copy the following pseudocode into the appropriate places in your source:
In development, RIVET_TOKEN
will use the development token generated by rivet run
. In production, RIVET_TOKEN
will be automatically added by the CDN.
Update your server
Copy the following pseudocode into the appropriate places in your source:
In development, RIVET_TOKEN
will use the development token generated by rivet run
. In production, RIVET_TOKEN
is automatically added to your environment by Rivet.
Step 3: Publish your game
This will print a URL ending in rivet.game
. If you are hosting your game on Rivet CDN, visit that URL to play your game.