Files
DFJ/tasks/task_036.txt
2025-12-16 08:57:19 +08:00

12 lines
866 B
Plaintext

# Task ID: 36
# Title: Spectator Mode
# Status: pending
# Dependencies: 10, 13, 21
# Priority: low
# Description: Allow non-playing users to join active game rooms as spectators, viewing the ongoing match in real-time.
# Details:
Backend: Extend WebSocket handling to allow 'spectator' roles. When a spectator joins, send them the current game state snapshot. Broadcast game updates to spectators without allowing them to send game actions. Frontend: Add a 'Spectate' option to rooms or friend profiles. Display the game board and actions without interactive controls. Hide opponent's plane placement until destroyed.
# Test Strategy:
Join an active game as a spectator. Verify real-time updates of game state (attacks, hits, turns). Ensure spectators cannot interact with the game. Test joining/leaving spectator mode. Verify performance with multiple spectators.