Before getting started, read about how OpenGB works.

1

Install Open Game Backend

  1. Install Git
  2. Install Deno
  3. Install Open Game Backend:
deno install -n opengb -fgA https://raw.githubusercontent.com/rivet-gg/opengb/v0.1.5/src/cli/main.ts
2

Create project

Create a new project by running the following command:

opengb init

This creates a backend.json config file. See the project configuration here.

3

Add modules

The default project comes with a set of modules preinstalled. For example, install the friends module by running the following command:

opengb module add friends

This adds the friends module to the backend.json file. You can also install modules manually by adding them to this config.

See a list of available modules here.

4

Run development server

The development server is great for testing your scripts locally. This will build & run your backend locally & hot reload when you make changes to the configuration.

opengb dev
5

Generate SDK (optional)

Open Game Backend will generate an SDK with type-safe methods to call your scripts.

Replace <output> with the path where you want to generate the SDK. Replace <target> with the target language.

opengb sdk generate --output <output> <target>

See the SDK docs for instructions on how to use the generated SDK.

Godot, Unity, Unreal, and Rust SDKs coming soon.

6

Deploy server (optional)

Install the Rivet CLI, then run the following:

rivet init
rivet deploy prod

See self-hosting instructions here.