Realtime & multiplayer

Rooms, presence, and authoritative shards.

WebSocket rooms provide per-member presence and broadcast for chat and collaboration. Authoritative Rust shards run multiplayer games at 20, 30, or 60 ticks per second on the same server as 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

How it works.

room · presence
Sarah
Marcus
Priya
room · 3 online

Join a room, publish a cursor, selection, or typing indicator, and receive everyone else's presence in real time. Broadcast ephemeral events that do not need to hit the database. The same server that holds your data supplies the multiplayer layer for docs, boards, and dashboards.

What you’d otherwise wire up.

Each line is a piece teams normally assemble for this one capability. On Pylon it is part of the runtime.

  • A presence service and its heartbeat and timeout rules
  • A pub/sub broker for ephemeral state that must not be persisted
  • Cursor, typing, and who's-online broadcast plumbing
  • A second socket running alongside your data connection

Apps built with it.

Scaffold any of these with npm create @pylonsync/pylon.

All examples →
liveWorld3D

A multiplayer procedural island with three.js in the browser and Pylon SSR and realtime sync on the server. Every visitor moves through the same world.

Realtime multiplayerthree.js + SSRLive sync
liveCo-op city builder

A shared SimCity-style builder on three.js + Pylon SSR. Every open tab is a co-mayor building the same city live.

Shared statethree.js + SSRRealtime
livePad

A collaborative markdown editor in one entity, two pages, and about 400 lines. Open a doc in two windows and watch edits merge through a text CRDT.

Text CRDTLive collaboration~400 lines

Build it on Pylon.

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