Frontend: multiplayer game route #47

Open
opened 2026-04-19 07:23:40 +00:00 by forgejo-lila · 0 comments
Owner

Context

Active multiplayer game view — questions and answers in real time via WebSocket.

Files to create

  • apps/web/src/routes/multiplayer/game.$code.tsx
  • apps/web/src/components/multiplayer/MultiplayerGame.tsx

Behavior

  • Receives game:question via WebSocket: display using existing QuestionCard and OptionButton.
  • Player selects answer: send game:answer via WebSocket.
  • Receives game:answer_result: show correct answer, per-player results.
  • Receives game:finished: navigate to results screen.
  • Countdown timer visible.

Acceptance criteria

  • Reuses QuestionCard and OptionButton from apps/web/src/components/game/
  • Questions appear in real time
  • Answers sent via WebSocket (not HTTP)
  • Results show who got it right/wrong
  • Smooth transitions between question/result/next
  • Handles disconnect gracefully
  • Mobile-friendly
## Context Active multiplayer game view — questions and answers in real time via WebSocket. ## Files to create - `apps/web/src/routes/multiplayer/game.$code.tsx` - `apps/web/src/components/multiplayer/MultiplayerGame.tsx` ## Behavior - Receives `game:question` via WebSocket: display using existing `QuestionCard` and `OptionButton`. - Player selects answer: send `game:answer` via WebSocket. - Receives `game:answer_result`: show correct answer, per-player results. - Receives `game:finished`: navigate to results screen. - Countdown timer visible. ## Acceptance criteria - Reuses `QuestionCard` and `OptionButton` from `apps/web/src/components/game/` - Questions appear in real time - Answers sent via WebSocket (not HTTP) - Results show who got it right/wrong - Smooth transitions between question/result/next - Handles disconnect gracefully - Mobile-friendly
forgejo-lila added the
multiplayer
label 2026-04-19 07:23:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo-lila/lila#47
No description provided.