Free Hosted Server · Open Source · TCP + WebSocket

Add Multiplayer
to Any Game

Submit a JSON schema, implement the lightweight state sync points, connect to server.roomielib.com, and your game has networked multiplayer. No backend to build, no servers to manage. Free.

Get Started - It's Free View on GitHub →

How It Works

Three things. That's it.

Roomie is a hosted game relay. You describe your game's data, we handle the networking.

📄

1. Write a JSON schema

Define your game's state and input types.
Paddles, positions, scores, whatever your game needs. PR it to the repo.

🔌

2. Use a client library

Grab the C++, Rust, GML, or C# client.
They default to server.roomielib.com. Connect, create a room, and go.

🎉

3. Ship your game

The server handles rooms, relay, host migration, and reconnects. You write game logic, not networking code.


Features

What you get out of the box

Everything is handled by server.roomielib.com. You focus on your game.

📊

Data-Driven State

Game state defined by JSON schemas. Any game plugs in by describing its snapshot and input types.
The server relays opaque blobs. Your data, your rules.

🎮

Client-Authoritative

One player is host and owns the game state. Others send inputs, the host merges and broadcasts. Simple, flexible authority model.

🔄

Host Migration

When the host disconnects, another player takes over automatically.
Full state resync. Everyone stays in the game.

🏠

Room System

Room codes, public/hidden listings, passwords, accept/deny, kick/ban, custom settings.
A complete lobby system.

🚀

Multi-App

One server hosts many games. Each app_key gets its own room pool. Your game shares the server but is fully isolated.

Always On

server.roomielib.com is running 24/7. No infrastructure to provision, no uptime to worry about. Just connect.


Quickstart

Networked Pong in 3 steps

Here's how the included Pong example connects to server.roomielib.com and just works. Your game follows the same pattern.

1

Grab the client library

Clone roomielib to get the client libraries and the Pong example. The Pong schema is already live on the server.

terminal
# Clone and build the C++ Pong example
git clone https://github.com/codename-B/roomielib
cd roomielib/clients/cpp
cmake -B build -DROOMIE_BUILD_EXAMPLE=ON
cmake --build build
2

PR your game schema

Every game defines its state and input as a JSON schema. Here's Pong's.
Write yours, open a PR. Once merged, your game is live on server.roomielib.com.

schema/pong.json
{
  "app_key": "pong",
  "version": 2,
  "encoding": "json",
  "types": {
    "Vec2":      { "x": "float", "y": "float" },
    "Ball":      { "pos": "Vec2", "vel": "Vec2" },
    "Paddle":    { "y": "float" },
    "PongState": {
      "ball": "Ball",
      "paddles": "array<Paddle>",
      "scores": "array<int>"
    }
  },
  "snapshot_type": "PongState",
  "input_type": "Paddle"
}
3

Connect and play

The client libraries connect to server.roomielib.com by default.
Run two instances. One creates a room, the other joins with the code. That's it.

C++ - what the Pong example does
// Connects to server.roomielib.com:8765 by default
RoomieClient client;
client.connect("server.roomielib.com", "8765");

// Player 1: create a room
client.create_room("pong", client_hash, nullptr);
// → receives Joined { room_code: "ABC123", side: 0, ... }

// Player 2: join with the code
client.join_room("pong", "ABC123", client_hash, nullptr);

// Host sends state, peers send input - server relays everything
client.send_move(state_blob, len);  // host
client.send_input(input_blob, len); // peer

Client Libraries

Pick your language

All libraries connect to server.roomielib.com out of the box. Open source and included in the repo.

C++

Full client library with CMake. Includes a networked Pong example built with Raylib.

Ready
🕸

Rust

Client library with the same protocol types used by the server. First-class support.

Ready
🎨

GameMaker

Native TCP with network_connect_raw. Same binary protocol.
No extensions or DLLs required.

Ready

C# / Unity

Full .NET client. Varint bincode protocol over TCP or WebSocket.

Ready
+

More

The protocol is open and simple enough to implement in any language that speaks TCP.

Coming Soon

Protocol

Open wire format

Length-prefixed frames with bincode + varint encoding. Simple enough to implement in any language. Full spec on GitHub.

Client → Server

MessagePurpose
HelloConnect with app_key + room code
MoveHost sends authoritative state
InputClient sends input to host
RoomControlCreate, settings, kick, ban, leave
ListRoomsQuery public rooms for an app
PingKeepalive / RTT measurement

Server → Client

MessagePurpose
JoinedRoom code, peer ID, side, state
PeerJoinedAnother player entered the room
PeerLeftA player disconnected
StateUpdateBroadcast game state blob
PeerInputForwarded input (to host only)
RoomEventHost transfer, kick, settings change