Building LinkMe Around the Host's Browser.doc

Building LinkMe Around the Host's Browser

24 September 2026 Harry Chapman

LinkMe is a four-clue party quiz for up to 16 players where the host's browser tab acts as the authoritative multiplayer server over WebRTC.

If you have ever played the board game Linkee, the premise is deceptively simple: each card has four trivia questions, and the four answers have a secret connection.

Say the four answers on a card turn out to be Golden, Labrador, Chesapeake Bay and Flat-Coated. The link is Retrievers.

The tension comes from when you buzz in. You can shout out the link after the very first clue for maximum points, at the massive risk of seeing “Golden” and confidently yelling “James Bond films!” while your friends watch you get locked out of the rest of the card.

I built LinkMe so up to 16 friends could play that format in a living room or over Discord using their phones as buzzers. And because I did not want to pay for a dedicated Node.js server just to run quiz night once a month, the entire multiplayer server runs inside the host’s browser tab.

One browser tab to rule them all

In a normal multiplayer web game, every client talks to a central cloud server. In LinkMe, the static site is just HTML and JavaScript on Cloudflare Pages. When the host creates a room, their browser spins up the authoritative state machine, generates a room code and QR code, uses PeerJS strictly for the initial handshake, and then talks directly to up to 16 player phones over peer-to-peer WebRTC data channels.

Running the server inside a player’s browser tab introduces two immediate problems:

  1. Cheating (or accidental spoiling): If the host broadcasts the full card object to every phone when Round 1 starts, anyone who opens Chrome DevTools (or inspects the WebRTC payload) can see all four answers and the link on Clue 1.
  2. The accidental refresh: If the host’s cat walks across the keyboard and hits F5, the server literally ceases to exist.

To solve the first problem, player browsers never receive the card data. They only send intent actions (LOCK_ANSWER, BUZZ_LINK, SUBMIT_LINK_GUESS). The host tab processes those actions against the real deck and broadcasts a redacted view projection: which clue number we are on, the text of the clues revealed so far, the current countdown timer, and which players have locked in an answer. The actual answers and the connecting link stay locked inside the host’s memory until the card transitions to the REVEAL phase.

To solve the cat problem, the host tab snapshots room state to sessionStorage on every transition. If the host refreshes or accidentally closes the tab, reopening the room reclaims the same room code in a paused state, and every player’s phone automatically reconnects with their score and current round intact.

A clock that speeds up when your friends are ready

Fixed timers in party games are terrible. Make the timer 20 seconds and slow typers panic; make it 60 seconds and eight people spend 45 seconds staring at their shoes waiting for one person who went to the kitchen.

LinkMe uses an elastic clock. On Normal speed, each clue starts with 45 seconds. Every time a player locks in their private answer for that clue, the drain rate of the clock accelerates, up to 4× normal speed. Once the last active player locks in, the clock jumps straight to a 3-second grace countdown and flips the next clue. If somebody hits the buzzer to guess the overall link, time freezes completely while they type or shout their answer.

If all four clues are on the table and the room is still stumped, the game deals out a final hint rendered as scrambled letter tiles.

Typo-forgiving robots vs shouting across the sofa

Because a link like "Types of retriever" might be typed by a frantic human on a phone screen as "retreivers", "retriever dogs" or "dogs that retrieve", LinkMe supports two judging modes:

  • Auto-judge with host override: Fuzzy string matching strips articles, plurals and minor typos automatically, while giving the host a one-tap button to overrule the computer if a player wrote something technically right that the matcher rejected.
  • Party / TV mode: The host puts their laptop or TV on the coffee table as the shared big screen, and players buzz on their phones and shout the link out loud for the host to thumbs-up or thumbs-down in the room.

The base deck ships with 264 cards across 13 categories, plus a browser-based pack editor with JSON import/export for custom inside-joke decks. End-of-card thumbs-up/down ratings sync to a tiny Cloudflare D1 database when online, and fall back to local storage if you are playing offline on a train.

LinkMe is an independent fan-made game inspired by Linkee and is not affiliated with its publishers. Play LinkMe.

Page 1 795 words 4 min Play