Phase 2.4: Live match viewer with SSE streaming #16

Open
opened 2026-06-07 22:44:22 -06:00 by ppreeper · 0 comments
Owner

Description

The crown jewel — real-time match simulation in the browser. The game engine runs on the server and streams events to the browser via Server-Sent Events (SSE). The frontend renders a timeline of commentary, a scoreboard, and match stats.

Backend

  • GET /match/play → SSE endpoint that streams LiveGameUnit events as JSON
  • Each event includes: minute, event type, commentary text, involved players, current score
  • Game speed control (pause, 1x, 2x, 4x) via HTMX POST

Frontend

  • Scoreboard: team names, score, minute clock
  • Commentary timeline: scrollable event list with color-coded entries (goal=green, card=yellow/red, etc.)
  • Match stats: possession, shots, fouls, cards
  • Key events highlighted (goals, red cards, injuries)

Depends On

  • Issue #10 (live game engine cleanup)

Acceptance Criteria

  • Match simulation plays out in browser in real-time
  • Commentary text is readable and varies between events
  • Score updates live as goals happen
  • Match ends after 90+ minutes with correct final score
  • User can pause and resume the match
## Description The crown jewel — real-time match simulation in the browser. The game engine runs on the server and streams events to the browser via Server-Sent Events (SSE). The frontend renders a timeline of commentary, a scoreboard, and match stats. ## Backend - `GET /match/play` → SSE endpoint that streams `LiveGameUnit` events as JSON - Each event includes: minute, event type, commentary text, involved players, current score - Game speed control (pause, 1x, 2x, 4x) via HTMX POST ## Frontend - Scoreboard: team names, score, minute clock - Commentary timeline: scrollable event list with color-coded entries (goal=green, card=yellow/red, etc.) - Match stats: possession, shots, fouls, cards - Key events highlighted (goals, red cards, injuries) ## Depends On - Issue #10 (live game engine cleanup) ## Acceptance Criteria - Match simulation plays out in browser in real-time - Commentary text is readable and varies between events - Score updates live as goals happen - Match ends after 90+ minutes with correct final score - User can pause and resume the match
ppreeper added this to the Phase 2 milestone 2026-06-07 22:50:42 -06:00
Sign in to join this conversation.
No labels
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
ppreeper/bygfoot#16
No description provided.