add-multiplayer

Installation
SKILL.md

Add Multiplayer (PartyKit / Cloudflare Durable Objects)

Add real-time or turn-based multiplayer to an existing single-player browser game. This skill scaffolds:

  1. A PartyKit server (one Durable Object per room) deployed to Cloudflare's edge.
  2. A client NetworkManager wired through EventBus that mirrors the existing playfun.js external-service pattern.
  3. Additive edits to EventBus, GameState, Constants, and render_game_to_text() — single-player gameplay must remain identical when the server is unreachable.

The default state is "single-player works." If the WebSocket connection fails, NetworkManager swallows the error and the game runs locally as before. When connected, remote players appear via network:player-joined and synchronize via network:state-received.

Reference Files

  • architecture.md — event taxonomy, GameState schema, NetworkManager contract, Phaser vs Three.js placement notes.
  • partykit-server.md — server templates (realtime.ts and turn-based.ts), state shape, broadcast helpers, rate limiting.
  • client-integration.mdMultiplayerClient, NetworkManager, RemotePlayerRegistry source, EventBus/GameState/Constants append patterns, render_game_to_text extension.
  • deploy.mdnpx partykit dev and npx partykit deploy walkthrough, capturing the deployed URL, .env handling, and client redeploy.

Core Principles

Installs
60
GitHub Stars
197
First Seen
May 26, 2026
add-multiplayer — playableintelligence/game-creator