lobbi

Free multiplayer lobbies for small browser games. Players connect directly to each other; we handle the introductions and the fallback.

Try it with a second tab

Join the shared board. The first person in becomes the host; everyone else sees the host's world. Open this page in another tab or on your phone to see it work.

Add it to your game

import { Lobbi } from 'lobbi';

const net = await Lobbi.connect({ key: 'pk_...', url: 'wss://api.example.com' });
const lobby = await net.joinOrCreate({ name: 'room-1', max: 8 });

lobby.on('message', (from, data) => { /* apply game state */ });
lobby.on('closed', (reason) => { /* host left: back to the menu */ });
lobby.send(myInput);   // players send to the host; the host can broadcast

Games are host-authoritative: the lobby creator runs the game and relays state to players. If the host leaves, the lobby closes. Direct connections are used whenever the network allows; otherwise traffic goes through a relay.