Skip to content
open.rooms
open.rooms

open.rooms

open.rooms

Realtime multiplayer rooms for turn-based games.

A room has seats, takes moves that the server decides, shows each seat a private view of the game, fills empty seats with computer players, and keeps a log of every move so a room can be replayed or picked up again after a restart. It is built on Zubra's sync layer and plays the games from open.games, but knows nothing about any particular game: a room is defined by a handful of functions.

One package: @journey-to-code/rooms, with a server (/server) and a browser client (/client).

Pages#

  • Getting started: a whole room, server and page, in one small game.
  • The server: what a room definition is, the options, and what the server gives you back.
  • The browser client: createRoom, openRoom, and what the page loads.
  • Bots and deadlines: computer players, slow thinking, turn timers and clocks.
  • Privacy: how a hand stays in one browser, and how people watch.
  • The HTTP API: the routes, for a client written in something else.
  • Releasing: how a version reaches npm.
  • For agents: the skills in .agents/ that let a coding agent use and maintain this.

Status#

Version 0.1. Its API is still settling while a spades game shapes it. MIT.

View this page's source