PUZZLTHINK

DEV NOTE

Friend rooms, open matches and rankings dev notes

From one shared link to a place to take on strangers.

Most PUZZLTHINK games can be played against the AI or against people, and there are two ways to play people: friend rooms, where you send someone a link or a code, and open matches, rooms anyone can join.

This note follows the commits from "play Wallgo over a link" on the first afternoon to open matches, rankings, revenge badges and room chat.

Published · 2026-11-26

Day one: Wallgo over a link

The first friend room arrived in Wallgo at 6:28 pm on 16 November: creating a room gives an invite link (copy it or use the phone’s share sheet), and the lobby has nicknames, seats, spectators and rematches.

The design is still the same. A room is one realtime channel (Supabase Realtime) and the host’s browser holds the game state. Other players’ moves go to the host, the host’s rule engine checks them, and everyone gets the new state. The turn clock (90 s in Wallgo) runs on the host too. With no game logic on a server, a new game’s rooms reuse exactly the rule code of its AI mode — 12 Janggi and Heavy 13 took the same approach that night.

Four-digit codes and dropped seats

The next morning every game’s entry screen got "play the AI / play friends", and invite codes became four digits (1000–9999) — short enough to read out. Before using a new code the creator quietly listens on that code’s channel and picks another if anyone is there. Old six-character links still open.

In multiplayer games one person leaving stalls the table. So a player disconnected for 20 seconds, or timing out twice in a row, is marked away and the AI plays the seat; the name stays, and pressing "rejoin" gives it back. If the host leaves, one of the others takes over as host and the old host’s seat is handled the same way. Rooms short of people, as in Heavy 13 and Russian Roulette, can fill empty seats with AI from the start.

17 November, evening: open matches

Open matches were built in six commits within a little over an hour from 7 pm on 17 November.

  1. STEP 01

    19:09 Open room lists

    Every multiplayer game’s entry screen got a list of open rooms (refreshed every 10 s) and a create button. While a room fills you practise solo; the waiting room is a left column on desktop and a drawer from a left-edge tab on phones. Quick reactions (ㅎㅇ ㄱㄷ ㅇㅋ ㅈㅈ ㅂㅂ) came in too.

  2. STEP 02

    19:14 Signed-in only

    Open rooms need sign-in to create or join — in return the waiting room shows each player’s record in the game and your record against them.

  3. STEP 03

    19:19 First card on the home page

    The home page’s first card became "Open match": every open room at a glance, create (pick a game) or join.

  4. STEP 04

    19:24 Revenge badges

    Rooms got titles, and anyone you have met shows your record against them with a badge: red revenge if you lost the last game, grey rematch otherwise.

  5. STEP 05

    19:37 Open-match rankings

    Open games are tagged and ranked per game (wins → win rate → who reached that many wins first). After a match, a revenge success (fireworks) or failure popup, and a rank-change popup.

  6. STEP 06

    19:44 Nicknames

    The first sign-in asks for a nickname (2–16 characters), used in every room and ranking.

At 8 pm practice changed to start on a button (instead of a game starting the moment you entered), and practice games were kept off the records.

Room chat and flood control

In the early hours of 20 November friend and open rooms got chat. Messages travel only over the room’s realtime channel and are stored nowhere. Flood control is simple: one line a second, five per ten seconds, never the same line three times in a row — checked when sending and when receiving. You can mute a player or turn chat off, kept in your browser only. New messages pop up as a bubble over the sender’s player box.

A small server’s first rush

At 4:10 pm on 21 November a rush made most database API calls fail with 504 (timeout). Per the commit, the free plan’s compute could not keep the API layer up. Several things were throttled at once: home rankings and the Hall of Fame answer from a 60-second cache, the online heartbeat went from 45 s to 120 s, activity tracking from 60 s to 120 s, the home open-room list from 20 s to 60 s. Ten minutes later friend and open rooms got a notice that this is a small one-person server and may be slow at peak times.

In numbers

As of 2026-11-26, 14:00 KST.

Signed-in players have 4,608 recorded games against people, 1,352 of them open matches, and 270 players have open-match records. Counting everyone, the games with the most friend and open plays are Slitherlink (2,985), Heavy 13 (2,071), Indian Poker (1,794), Wallgo II (1,618), One Stroke (1,190) and Wallgo (1,114).

Where this comes from

This note is written only from the code, the commit history and the aggregate numbers below.

  • `src/lib/room.ts`, `src/lib/openRooms.ts`, `src/lib/roomAway.ts` (AWAY_AFTER_MS, MISSES_FOR_AWAY), `src/lib/roomChat.ts`
  • Commits a81ce52 (11/16 Wallgo friend rooms), 91ba80a (11/17 entry screen, 4-digit codes), 54a620f, 446ab44, 49cb638, 73e3584, 5948642 and d6dc3cd (11/17 open matches, sign-in, home card, revenge, rankings, nicknames), 3f050bb and 160740c (11/17 practice), aca18bf (11/18 ranking from 1 win), 7d7eb26 (11/20 room chat), d2dd35e and e149478 (11/21 peak-time fixes)
  • DB aggregates (2026-11-26 14:22 KST): game_results (mode = friend) count, games and players with detail.open, game_plays_daily (mode = friend) totals by game

Read next

  • Hall of Fame, clear certificates and contests dev notes

    Records and the Hall of Fame, numbered clear certificates, the piece and black piece contests — why the bar dropped from 5 wins to 1 and why only Russian Janggi is capped.

  • Profile icons and badges dev notes

    From a coloured stone beside a ranking to per-game #1 crowns, contest rewards, achievement badges and HIDDEN MISSION — the icon order, the auto-equip rule, and who holds what so far.

  • Slitherlink map challenge dev notes

    Same seed, same board; clues removed while the answer stays unique; from a time ranking to a boards-owned ranking — and the numbers behind 10,000+ Slitherlink boards.

All dev notes →