Multiplayer
Multiplayer
Players meet in rooms on the game page. ARCADE runs the match, checks every move on the server, and sends each move to everyone.
How it works today
Multiplayer runs through the ARCADE server over Socket.IO (WebSocket first). The server is the referee: every move is checked with the game's rules before the other players see it, which keeps matches fair.
| Mode | Good for | Players |
|---|---|---|
| Turn-based | Board and card games. The server applies the game’s rules to each move (Chess Pro, Ludo Royale, Snake & Ladder). | 2 to 4 |
| Race | Everyone plays their own copy; scores and finish times are compared. | Up to 8 |
| Social | Players share a room and chat without a shared game state. | Up to 8 |
| P2P (fast play) | Action games that need low lag. Players connect directly; one player hosts the game. See P2P for fast games. | Up to 8 |
In your game
Players create or join a room with the Multiplayer panel on the game page. Once a match starts, the page gives your game a multiplayer object:
// Available in the game once a match is running:
const mp = window.__arcadeGameApi.multiplayer;
await mp.ready(true); // "I'm ready"
await mp.sendAction('move', { from: 'e2', to: 'e4' });
const stop = mp.onEvent(({ action }) => { // every player's moves, in order
applyMove(action.actionType, action.payload);
});
await mp.finish({ winner: 'ann' }); // end the match- Each move is numbered, so moves arrive once and in order, even after a reconnect.
- A player who drops can rejoin the same match.
- For race games, submit each player's score with
sdk.score.submit(); ARCADE compares them.
To turn multiplayer on for a game, ask ARCADE staff to set its mode and player count.