Backend for .io Games

.io-style games live or die on zero-friction entry — no installs, no sign-up walls, instant lobbies. That shape maps directly onto this API.

How the API maps to .io play

The 15-line core loop

import { MultiplayerClient } from 'michitai-multiplayer';
const mp = new MultiplayerClient(API_TOKEN);

const token = localStorage.mp_token ??= (await mp.players
  .register(nickname)).private_key;

const lobbies = await mp.matchmaking.list();
const { matchmaking_id } = lobbies.matchmaking[0];
await mp.matchmaking.join(token, matchmaking_id);

const rt = mp.createRealtime({ onReceive: applyState });
await rt.connect((await mp.realtime.get(token)).token);
setInterval(() => rt.send('all', 'pos', myPosition), 50);

Honest limits

Browser .io games send on the WebSocket lane only — no browser UDP. For high-rate twitch arenas, host authoritative game logic server-side (your Node.js server can use the same SDK with the UDP lane) and use rooms/matchmaking here for the lobby shell. Slower arenas, .io-style card/party variants and 1v1 duels run entirely on the WS lane — see WebGL & browser games for the transport detail.

Ship your .io game

Free tier — full API surface, no credit card. The JavaScript SDK runs in the browser with zero dependencies.

Related: Browser Games · Party & Social Deduction · All Use Cases