Context
Phase 5 of prompt spell doors (#213). Doors stay open across sessions and sync to all players in real-time.
Scope
Firestore Persistence
- Door state per room:
rooms/{roomId}/doors/{doorId} → {unlockedBy, unlockedAt, challengeCompletions}
- Challenge progress per user:
users/{uid}/spellProgress → attempts, completions, per-school stats
- Doors stay open permanently once unlocked (first wizard opens the path for everyone)
Multiplayer Sync (LiveKit)
- Door unlock event broadcast on data channel (topic:
door-unlock)
- All connected players see door open animation in real-time
- Late-join: door states loaded from Firestore on room join (already-opened doors render as open)
Edge Cases
- Collaborative doors: N players must each solve a different challenge before door opens
- Progress counter sync: "2/3 incantations spoken" updates for all players
- Offline unlock: if Firestore write fails, optimistic local unlock with retry
Depends on
Part of
Prompt spell doors (#213)
Context
Phase 5 of prompt spell doors (#213). Doors stay open across sessions and sync to all players in real-time.
Scope
Firestore Persistence
rooms/{roomId}/doors/{doorId}→{unlockedBy, unlockedAt, challengeCompletions}users/{uid}/spellProgress→ attempts, completions, per-school statsMultiplayer Sync (LiveKit)
door-unlock)Edge Cases
Depends on
Part of
Prompt spell doors (#213)