Open source, MIT
Multiplayer rooms for browser games.
Your game runs in the browser. tickcli makes it multiplayer, with no server code.
- 1 Make your gameOne HTML file. Write it yourself or with your AI.
- 2 Add tickcliTwo calls: share your player, draw everyone.
- 3 Play with friendsSend the room link. They join in their browser.
npx tickcli-js ./gamesBuilding a whiteboard, a poll or another live app? See live and collab apps.
- 0runtime dependencies (the Node adapter uses
ws) - 14 KBroom.js, gzipped
- 960players in 60 rooms on one 6-core server, none dropped
- MITlicense, server included
Who it's for
Pick what you are building. Same rooms, same two calls underneath.
Multiplayer for the browser game you already have
Rooms, invite links, a lobby, reconnects and smooth movement, with no game server to build or run for every game.
- Write the whole game in one HTML file, or keep Phaser, PixiJS, three.js, Babylon.js or Kaplay.
- Game jams: one file, one link, and people are playing a few minutes later.
- Co-op, party, board and arena games. A room holds 16 players by default.
// every player, every frame
g.me.set({ x, y }); // 1. share where I am
for (const p of g.players) // 2. draw everyone
dot(p.state.x, p.state.y, p.me);Live rooms for small-group apps
Brainstorming walls, planning poker, retro boards, live polls and quizzes, drawing together: a few people, one link, one session.
- Live cursors and presence: each person shares their own state, eased on every screen.
- One writer for the shared board: edits go to the host's browser as actions, never merged or dropped.
Room()starts by itself in a private room: no Start button, the invite link brings people straight in.- Invite link and room code built in. A dropped seat is held 30 seconds, 5 minutes if a phone switched apps.
tickcli for live apps Open Planning Poker
Sessions, not documents. Up to 16 people, 64 KB of shared state, 64 cards a list, 200 characters a text. Long documents, rich-text co-editing and offline edits need a CRDT such as Yjs; tickcli can still carry the cursors beside it. All limits
const room = Room({
title: "Idea wall", max: 16,
player: { x: [0, 1600], y: [0, 900] },
actions: {
// runs on the host's browser: one writer
note(room, from, n) {
const id = `${from}-${Date.now()}`;
room.shared.set({ notes: { [id]: n } });
},
},
update(room) { // every frame, every page
draw(room.players, room.shared.notes);
},
});
const board = document.querySelector("#board");
board.onpointermove = (e) =>
room.me.set({ x: e.offsetX, y: e.offsetY });
board.ondblclick = (e) => room.act("note", {
text: prompt("Idea?"),
x: e.offsetX, y: e.offsetY,
});Your AI writes the app. tickcli does the network part.
Models write plain HTML and JavaScript well. Sync, reconnects and late joiners are what they usually get wrong.
- One file the model can read whole: the game or app, the lobby and the room.
- Everything the host writes to
g.sharedreaches every screen, late joiners included. No per-feature sync code. - Give it llms.txt, then take it live with the laptop-to-live guide.
Build a planning-poker app for up to 12 people in one HTML file with tickcli. Read https://tickcli.com/docs/llms.txt first. Use Room() from game.js (it starts by itself and has the invite link). Each vote is the person's own state (room.me.set); Reveal and New round ask the host with room.act, and the host writes room.shared. Test it in two browser windows with npx tickcli-js.
Host games you didn't write
Arcades, classroom tools and party apps that run other people's games.
- The hub never runs game code, so a new game needs no server change.
- The game page can sit in a sandboxed iframe with no network access. The relay outside it holds the socket, so the page never sees a ticket, a pass or an address.
- Every message has a size and a rate limit.
- Players per room
- 16
- Rooms per server
- 500
- Message size
- 16 KB
- Messages per socket
- 50 a second
- Shared state per room
- 64 KB
One HTML file. Two calls.
Every player moves themselves and calls g.me.set. Every screen draws g.players. That is the whole network part.
Game()brings the lobby, room code, invite link, reconnects and a touch pad on phones.- You declare each field's range; the hub refuses any value outside it.
- Other players are drawn a moment in the past and eased between updates.
Save it as dots.html, run npx tickcli-js in that folder, open it twice. Quick start
<script src="room.js"></script>
<script src="game.js"></script>
<script>
let x = 400, y = 300;
Game({
title: "Dots", size: [800, 600],
multiplayer: { max: 8, player: { x: [0, 800], y: [0, 600] } },
update(g, dt) {
const a = g.axis(); // arrows, WASD or touch
x = Math.min(800, Math.max(0, x + a.x * 250 * dt));
y = Math.min(600, Math.max(0, y + a.y * 250 * dt));
g.me.set({ x, y }); // 1. share where I am
},
draw(g, ctx, w, h) {
ctx.fillStyle = "#0f172a"; ctx.fillRect(0, 0, w, h);
for (const p of g.players) { // 2. draw everyone
ctx.fillStyle = p.me ? "#60a5fa" : "#e2e8f0";
ctx.beginPath();
ctx.arc(p.state.x, p.state.y, 12, 0, 7); ctx.fill();
}
},
});
</script>How it works
No game code ever runs on the server, so a new game needs no server change.
- 1
One browser runs the rules
One player is the host: their browser runs rounds, timers, health and scores. If they leave, another player takes over.
- 2
The hub keeps everyone in sync
A small Node server holds each room's state, the order of changes and the limits. Every message has a size and rate limit.
- 3
Every screen stays smooth
Positions ease between updates, 3D rotations blend. A seat is held 30 seconds after a drop, 5 minutes if a phone switched apps.
Keep the engine you have
Your engine draws and runs its own loop. tickcli adds the lobby and the room around it, and keeps one sprite per other player.
- Phaser
- PixiJS
- three.js
- Babylon.js
- Kaplay
- Your own loop
const g = Game({
headless: true,
multiplayer: { max: 8, player: { x: [0, 800], y: [0, 600] } },
});
// in your Phaser scene's update():
if (g.state === "playing") g.me.set({ x: hero.x, y: hero.y });
g.sync(
(p) => this.add.circle(0, 0, 14, 0xf87171), // joined
(s, st) => s.setPosition(st.x, st.y), // each frame
(s) => s.destroy(), // left
);Games running on it
Every clip is a few seconds of real play in two or more browsers. All of them are in the repo, one HTML file each.
Star Drift
One big space map: mine rocks, build bases and fight. Galaxy never resets; Quick Game plays 10-minute rounds. Each ship is sent only what is near it.
Star Squad
A co-op side-scroller: six heroes with their own skills, five planets with traps, weather and a boss each.
Heroes and Lanterns
A co-op dark-fantasy crawl: light the lanterns, bind weakened monsters as companions, then a three-phase boss.
What it is not for
Ranked play or prizes
The host's browser decides hits and scores, so a player who edits their browser can cheat. Fine for friends, party games and co-op. Not for esports.
One huge room
A room holds 16 players by default. One server runs many rooms; one room is not an MMO. All limits
Make your first room
Two minutes, one file, no account.