Realtime & multiplayer

Rooms, presence, and authoritative shards.

WebSocket rooms with per-member presence and broadcast for chat and collaboration. Authoritative tick-based shards in Rust — 20, 30, or 60 ticks per second — for multiplayer games. All on the same server that runs the rest of your app.

components/Presence.tsx
import { useRoom } from "@pylonsync/react";

function Whiteboard({ boardId }: { boardId: string }) {
  const { members, broadcast, presence } = useRoom("board:" + boardId, {
    presence: { cursor: { x: 0, y: 0 } },
  });

  // members[].presence.cursor updates live as others move.
  return <Cursors members={members} onMove={(p) => presence.set({ cursor: p })} />;
}
  • Rooms with join/leave events, per-member presence, and broadcast
  • Authoritative 20/30/60 tps simulation loops written in Rust
  • Area-of-interest filtering, snapshot + delta replication, late-join, observer slots
  • Same binary, same auth, same data model as the rest of your app
01

Presence and broadcast for collaboration

Join a room, publish presence (a cursor, a selection, a typing indicator), and receive everyone else's in real time. Broadcast ephemeral events that don't need to hit the database. It's the multiplayer layer for docs, boards, and dashboards — built into the same server that holds your data.

02

Authoritative simulation for games

For real-time games, run a fixed-tick loop in Rust where the server is the source of truth. Area-of-interest filtering sends each player only what's near them; snapshot-plus-delta replication keeps bandwidth flat; late-joiners get a full snapshot then deltas. Observer slots let spectators watch without affecting the sim.

03

One stack for app and game

The app primitives (schema, auth, sync) and the game primitives (rooms, shards) are the same binary. A multiplayer game's accounts, inventory, and matchmaking live in the same typed database as its tick loop — no glue between two systems.

Build it on Pylon.

One framework for your schema, sync, auth, functions, realtime, and SSR. Free to start.