Open Party Lab supports optional game repos. A game can live in its own repository and be linked into the platform only when present locally.
The platform owns:
- room creation and join flow;
- shared host/controller apps;
- generic lobby/setup rendering;
- generated optional game registries;
- reusable controller layouts;
- shared DTO and socket contracts.
A game repo owns:
- its manifest;
- game-specific protocol types;
- authoritative server logic;
- host rendering;
- controller model or layout binding;
- game-specific assets and docs.
The server must remain authoritative. Controllers should send player intent, not decide winners or score changes.
Use a short game id as the repository and folder name:
Open-Party-Lab/
local-games/
example-game/
The npm package can use the scoped package name:
@open-party-lab/game-example-game
External games should expose these subpath exports:
@open-party-lab/game-example-game/manifest
@open-party-lab/game-example-game/protocol
@open-party-lab/game-example-game/server
@open-party-lab/game-example-game/host
@open-party-lab/game-example-game/controller
The platform should import only documented public entrypoints. Do not import private files from a game repo.
- Create or clone the game repo under
local-games/<game-id>. - Add the game to
config/known-games.json. - Export manifest, protocol, server, host, and controller entrypoints.
- Reuse an existing controller layout where possible.
- Add a new generic controller layout only when the interaction model genuinely needs it.
- Run
npm run games:sync-localfrom the platform repo. - Run
npm run typecheck. - Run
npm run buildfor release-facing changes. - Update docs and
docs/project-status.mdif status or limitations changed.
Keep the first version small. A good first mini-game has:
- one clear round loop;
- explicit player inputs;
- serializable server state;
- simple scoring;
- host feedback that is readable from a TV;
- phone controls that work on small screens;
- no unclear third-party assets or names.
Avoid starting with advanced matchmaking, persistence, monetization, complex animations, or large asset pipelines.
From the game repo:
npm install
npm run typecheck
npm run buildThen from the platform repo:
npm run games:sync-local
npm run typecheck
npm run dev:allFor AI or automated smoke checks, virtual controllers can join an existing room:
npm run ai:controllers -- --room DEBU --players 4 --ready true --hold-ms 600000If the game needs input, pass game-specific input JSON:
npm run ai:controllers -- --room DEBU --players 4 --input-json "{\"type\":\"tap\"}" --input-duration-ms 3000Each game repo should include:
- a short README with status and screenshots;
- package entrypoints;
- development checks;
- known limitations;
- asset and rights notes;
- an
AGENTS.mdfile for AI-assisted contributions.