🚧 This documentation page is a work in progress 🚧
Overview
Godot provides great multiplayer capabilities out of the box. We’ll be using Godot’s built-in networking along with Rivet’s Godot plugin to build a server-authoritative multiplayer game on top of Rivet. Godot supports ENet, WebSocket, and WebRTC transports. We’ll be using ENet for this tutorial, but it’s easy to swap out.Step 1: Set up the Rivet Godot plugin
Follow the instructions on the Rivet Godot plugin repository to install the plugin. Once the plugin is open, sign in to link your game to Rivet.Step 2: Update game code
Add the following code to the relevant places. Add this code to where the game is started:setup_multiplayer()
call will do a check to properly start a Godot. Add this code wherever the server is started. This function name needs to
match
the one used in the RivetHelper.start_server.connect
call above.
Step 3: Deploy to Rivet
Configure Rivet
Copy the following torivet.json
:
Write Dockerfile
Write the followingDockerfile