Online play

In online mode 2–6 players play over the internet, the app rolls the dice.

Creating a game

  1. Lobby (/games) → click Online game
  2. A modal opens with your accepted network connections
  3. Pick 1–5 people (you + 5 = max 6 players)
  4. Click Send invites → the game is created in Waiting state

Note: you can only invite people you have a mutually accepted network connection with. If you don't have any, go to network and connect.

Waiting room

After creation the game stays in the waiting room until it starts:

  • As the host you see Start game, available once at least 2 players accept
  • Invited players get a notification and see the invite in the lobby under Invitations
  • They can:
    • Accept → join the game, wait for start
    • Decline → the invitation disappears (host sees the name without a check)

The host can cancel the game in the waiting room via Delete game.

During the game

After the start it's played in rounds — each player takes a turn, then the next, etc. 9 levels × N players = 9×N turns total.

Your turn

When it's your turn, you see the game panel with:

  • A Roll 6 dice button
  • After roll 1: pick a category (with score preview for each)
  • After picking: hold dice (click a die = orange border = kept)
  • Buttons Roll again (X) and End turn (score)

When it's not your turn

You see the Spectator panel — watch the other player's turn in real time:

  • Current dice
  • Roll number (1/3, 2/3, 3/3)
  • Picked category
  • Current score

Timer (5 minutes per turn)

To prevent the game from stalling, each turn has a 5-minute timeout:

  • A countdown starts when the turn begins (visible in the header)
  • The last 60 seconds turn red
  • If time runs out, the app automatically writes 0 to the player's first unrecorded category and the turn moves on

The timer is visible to spectators too — you see how much time the active player has left.

Chat

Bottom right there's a message icon (MessageCircle):

  • Click → chat panel opens
  • Write messages, other players see them in real time (Supabase Realtime)
  • Unread badge shows the number of unread messages
  • Max 500 characters per message
  • Chat works in the waiting room, during the game, and after it ends (rematch, congrats)

End game and rematch

When everyone plays all 9 levels:

  • Game moves to Finished
  • A winner is announced (crown in the table, message at top)
  • Host sees a Rematch button — creates a new game with the same players (invites are re-sent)

The host can also end the game early (before level 9) via End game — the winner is determined by the current total.

Sound

Top left in the header there's a speaker icon:

  • Sound on = a synthesized roll sound plays on each dice roll (Web Audio API)
  • Spectators hear it too — you know when someone rolled
  • The setting is stored in localStorage

Statistics

Wins and game counts are recorded in your profile. Stats update automatically after each online game ends.

Tips

  • Invite many people at once — bigger group is more fun (4–6 players is ideal)
  • It's okay to leave — the 5-minute timeout means the game can span hours/days
  • Watching via spectator — once you're a player you can watch others even when it's not your turn
  • Chat = part of the experience — congrats, banter, planning a rematch