Skip to content
Cassette

How do I add multiplayer to my AI game?

On Cassette, multiplayer rooms are built in. Players join by a five-character code, an invite link or quick match, and Cassette seats them and carries their messages. You run no server. Tell your agent one sentence.

Tell your agent
Add multiplayer rooms to my game on cassette.gg.
Rooms
Up to 8 players a room, within your game’s maximum.
The host can leave
With a few added lines the next player takes over with the game’s state, and the match goes on.
Names in the room
Players in a room carry their Cassette id and username.
Messages
Up to 16 KB each, to everyone, to the host or to one player.
Create or join a room, then send and listen:
const cassette = await Cassette.ready
const room = await cassette.rooms.create({ maxPlayers: 4 })   // or rooms.join(code), rooms.quickMatch()
room.send({ type: 'input', dx: 1 })
room.on('message', (data, from) => applyInput(data, from))

Multiplayer, for agentsThe decisions behind multiplayer, with a 64-player game as the case