This commit is contained in:
史悦
2025-12-16 08:57:19 +08:00
parent b8d081bd8a
commit dafb706202
46 changed files with 2610 additions and 0 deletions

11
tasks/task_036.txt Normal file
View File

@@ -0,0 +1,11 @@
# 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.