partykit-multiplayer
Installation
SKILL.md
PartyKit multiplayer
Real-time multiplayer for studio games. The transport is PartyKit (a Cloudflare Durable Object behind a WebSocket), wrapped behind a thin typed client so the rest of the engine never touches the socket. Networking lives in two places:
party/<room>.ts— the server: one Durable Object class per room (the "party").src/net/*— the client:NetClient(typed event interface overpartysocket),RemoteAvatar(the visual + raycast proxy for another player), andplayerAvatars.ts(shared avatar/slot-color data).
The networked game mode is a normal system in modes/ (see fps-arena): it owns the
NetClient, maps server messages onto the world, and pushes scoreboard state to the HUD.