Multiplayer
vgai does multiplayer with Colyseus β you call it directly, no wrapper. State syncs from server to client through Colyseus schemas and the Callbacks API.
In this section
Section titled βIn this sectionβ- Networking model β
NetTransport+StateReplication, and the Colyseus implementation. - Rooms β defining a
Room<State>with@colyseus/schema; the shipped rooms (arena, tank, notblox, generic). - The Callbacks API β
onAdd/onChange/onRemove; reading live schema fields inonChange(never destructuring them). - Server-authoritative patterns β input up, state down; reconciling client and server.
- Add a room β a walkthrough from server class to client connection.
- Capstone β the multiplayer arena / tanks game.