Download Rift

Play Rift on your computer, or make your own games with the Rift editor.

Linux x86-64

To play
desktop-client The game.
rift.env Tells desktop-client and game-server where to connect. Keep it next to them.
To make games
editor Makes and changes games.
game-server Runs a game that desktop-client connects to.
rift-example-game.zip The example game, to open in editor.

Before the first start

A browser saves a program without permission to run. Open a terminal in your download folder, and give that permission to each program you downloaded:

chmod +x desktop-client editor game-server

Then start a program from the terminal, such as ./desktop-client.

Windows x86-64

To play
desktop-client.exe The game.
rift.env Tells desktop-client and game-server where to connect. Keep it next to them.
To make games
editor.exe Makes and changes games.
game-server.exe Runs a game that desktop-client connects to.
rift-example-game.zip The example game, to open in editor.

Before the first start

Double-click a program to start it. The programs aren't signed, so Windows may say it protected your PC: click More info, then Run anyway.

macOS Apple silicon

To play
desktop-client The game.
rift.env Tells desktop-client and game-server where to connect. Keep it next to them.
To make games
editor Makes and changes games.
game-server Runs a game that desktop-client connects to.
rift-example-game.zip The example game, to open in editor.

Before the first start

A browser saves a program without permission to run. Open a terminal in your download folder, and give that permission to each program you downloaded:

chmod +x desktop-client editor game-server

The programs aren't signed, so macOS also blocks them. Unblock them:

xattr -d com.apple.quarantine desktop-client editor game-server

Then start a program from the terminal, such as ./desktop-client.

Play on k573.dev

  1. Download desktop-client and rift.env into the same folder.
  2. Start desktop-client. The first start downloads the game, which takes a while. Later starts only download what changed.
  3. Click Sign in, or Create account if you have no k573.dev account yet. Your browser opens k573.dev. Sign in there, then switch back to the game.

It's the same account you play in the browser with.

Make a game

  1. Download editor, game-server, desktop-client and rift-example-game.zip into the same folder.
  2. Extract rift-example-game.zip in that folder. It holds a single folder, content, which is the example game. Your folder now looks like this:
    desktop-client
    editor
    game-server
    rift-example-game.zip
    content/
    Windows offers to extract into a new folder named rift-example-game. Remove that name from the path, so content lands next to editor.exe.
  3. Start editor, click Open folder… and choose content.
  4. Click ▸ Play to try the game. editor starts game-server and desktop-client for you, and you play as one of the game's test characters.

editor looks for game-server and desktop-client in its own folder, and they have to come from the same download as editor. Trying a game this way needs no account and no internet, and ignores rift.env.

Run your own server

Run game-server on your computer and connect desktop-client to it. It uses fake accounts: any name signs in, without a password. Start desktop-client several times to play as several players.

  1. Download game-server, desktop-client, rift.env and rift-example-game.zip into the same folder, and extract rift-example-game.zip there, as in Make a game.
  2. Open rift.env in a text editor, and change these five lines to:
    RIFT_CLIENT_GAME_SERVER_URL=http://127.0.0.1:9998
    RIFT_CLIENT_GAME_SERVER_WS_URL=ws://127.0.0.1:9999
    RIFT_CLIENT_AUTH=fake
    RIFT_GAME_SERVER_BIND=127.0.0.1
    RIFT_GAME_SERVER_AUTH=fake
  3. Start game-server, and keep it running.
  4. Start desktop-client, type any name, and click Sign in. The same name always signs in to the same character.

To run a game of your own instead of the example game, set RIFT_GAME_SERVER_CONTENT_DIR in rift.env to your game's folder.

Let others join

Everyone has to download from the same build as your game-server.

  • On your home network, with fake accounts: in your rift.env, set RIFT_GAME_SERVER_BIND=0.0.0.0. Each player uses a rift.env like yours, with 127.0.0.1 changed to your computer's address.
  • Over the internet, with k573.dev accounts: keep rift.env as downloaded, apart from RIFT_GAME_SERVER_CONTENT_DIR, and open ports 9998 and 9999 to the internet. Each player changes the first two lines of their rift.env to your address, such as http://203.0.113.5:9998 and ws://203.0.113.5:9999, and signs in with their k573.dev account.

rift.env

desktop-client and game-server read rift.env from their own folder. Each line sets one value, as NAME=value. Every value is required, unless it says optional. A relative path counts from the folder rift.env is in. An environment variable with the same name wins over the line in rift.env.

Read by desktop-client

RIFT_CLIENT_GAME_SERVER_URL
The HTTP address of the game-server to play on.
RIFT_CLIENT_GAME_SERVER_WS_URL
The WebSocket address of the same game-server.
RIFT_CLIENT_AUTH
oidc: sign in with a k573.dev account, in your browser. fake: sign in with any name.
RIFT_CLIENT_PROFILE_DIR
The folder where desktop-client keeps your preferences and the downloaded game.
RIFT_CLIENT_EXIT_ON_STDIN_EOF
true quits desktop-client when the program that started it closes its input, as editor does. Otherwise false.
RIFT_CLIENT_ACCESS_TOKEN optional
Signs in with this token and skips the sign-in screen, as editor does.
RIFT_CLIENT_PROBE optional
Only for automated tests.

Read by game-server

RIFT_GAME_SERVER_BIND
127.0.0.1: only your computer can connect. 0.0.0.0: any computer that can reach yours can connect.
RIFT_GAME_SERVER_PORT
The port of the HTTP address.
RIFT_GAME_SERVER_WS_PORT
The port of the WebSocket address.
RIFT_GAME_SERVER_CONTENT_DIR
The game folder to run.
RIFT_GAME_SERVER_AUTH
oidc: players sign in with k573.dev accounts. fake: players sign in with any name, so anyone can play as anyone. Use it only where you trust everyone who can connect.
RIFT_GAME_SERVER_MAX_CLIENTS
The most players at once.
RIFT_GAME_SERVER_PLAYER_SPAWN_TYPE
map: new players start where the game says. dist: new players start spread over every area, for load tests.
RIFT_GAME_SERVER_PLAYER_IMMORTAL
true: players can't die, for testing. Otherwise false.
RIFT_GAME_SERVER_DAILY_RESET_UTC_HOUR
The hour, 0 to 23 in UTC, when the game's daily limits reset.
RIFT_GAME_SERVER_TEST_CHARACTERS
on: players can join as one of the game's test characters, as editor's ▸ Play does. Otherwise off.
RIFT_GAME_SERVER_EXIT_ON_STDIN_EOF
true quits game-server when the program that started it closes its input, as editor does. Otherwise false.
RIFT_GAME_SERVER_PYROSCOPE_ENABLED, RIFT_GAME_SERVER_PYROSCOPE_SAMPLE_HZ
Profiling for k573.dev's own servers. Keep false.
RIFT_GAME_SERVER_RNG_SEED optional
A number that makes the game's randomness play out the same on every run.

Read by both, for k573.dev accounts

Read only when RIFT_CLIENT_AUTH or RIFT_GAME_SERVER_AUTH is oidc. They point at k573.dev's sign-in service, so keep them as downloaded.

RIFT_AUTH_ISSUER
The address of the sign-in service.
RIFT_AUTH_AUDIENCE
The name the sign-in service knows Rift by.
RIFT_AUTH_JWKS_URI
Where game-server checks that a sign-in is genuine.
RIFT_AUTH_TOKEN_URI
Where desktop-client finishes a sign-in.

editor options

editor takes these options when you start it from a terminal:

editor [FOLDER] [--user-folder PATH] [--scene JSON] [--frame-log PATH]
FOLDER
Opens this game folder right away.
--user-folder PATH
Keeps editor's preferences and history in PATH, instead of in the rift-editor folder of your user data.
--scene JSON
Opens editor in a given state, for recordings and tests. --help lists the steps it takes.
--frame-log PATH
Writes the time of every frame to PATH.
--shapes
Prints the format of every kind of game content as JSON, then quits.

All three programs take --build-info, which prints the build they come from, then quits. Programs from different builds can't play together.