feat: Add multiplayer networking architecture and documentation updates
- Updated Master Blueprint Index to include Multiplayer Networking support. - Added detailed Multiplayer Networking sections across all developer documentation (01-11). - Introduced authority maps, key patterns, and RPC guidelines for each system. - Established a comprehensive multiplayer networking architecture document outlining core principles, replication strategies, and anti-cheat considerations. - Enhanced UI documentation to clarify local-only behavior and binding to replicated dispatchers. - Implemented client prediction strategies and RPC naming conventions for consistency across the framework.
This commit is contained in:
@@ -153,4 +153,45 @@ The 16 build phases follow dependency order:
|
||||
|
||||
---
|
||||
|
||||
## Multiplayer Networking Architecture
|
||||
|
||||
The framework is built server-authoritative from the ground up. See [`docs/architecture/multiplayer-networking.md`](../architecture/multiplayer-networking.md) for the full specification.
|
||||
|
||||
### How Networking Fits the Layers
|
||||
|
||||
```
|
||||
┌────────────────────────────────────────────────────────────────┐
|
||||
│ LOCAL-ONLY LAYER (never replicated) │
|
||||
│ WBP_* Widgets, Camera, Embodiment, Debug, Analytics, Tutorials │
|
||||
├────────────────────────────────────────────────────────────────┤
|
||||
│ REPLICATED STATE LAYER (server-authoritative) │
|
||||
│ GS_CoreGameState (chapter, objectives, encounter, time) │
|
||||
│ Player Components (health, stamina, stress, movement, hide) │
|
||||
│ World Actors (doors, containers, pickups, puzzles) │
|
||||
│ Inventory (slots, weight, equipment) │
|
||||
│ Narrative (flags, dialogue state, objectives) │
|
||||
│ AI (position, alert state, health — behavior trees on server) │
|
||||
│ Adaptive (atmosphere tier, tension, difficulty params) │
|
||||
├────────────────────────────────────────────────────────────────┤
|
||||
│ CLIENT PREDICTION LAYER (cosmetic, corrected by server) │
|
||||
│ Weapon fire FX, muzzle flash, recoil, hit markers │
|
||||
│ Stamina bar, health bar (predicted; RepNotify corrects) │
|
||||
│ Door animations (predicted; OnRep confirms) │
|
||||
├────────────────────────────────────────────────────────────────┤
|
||||
│ SERVER-ONLY LAYER │
|
||||
│ AI Behavior Trees, Damage Calculation, Loot Generation │
|
||||
│ Save/Load coordination, State Gating validation │
|
||||
└────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### Key Multiplayer Principles
|
||||
1. **HasAuthority() gate** on every mutator function
|
||||
2. **Server_ RPC** for client→server requests
|
||||
3. **RepNotify** fires same dispatchers as SP code — UI needs zero changes
|
||||
4. **Client prediction** for responsiveness; server correction for correctness
|
||||
5. **AI runs on server** only — replicated to clients via Actor replication
|
||||
6. **UI is local per-client** — binds to replicated dispatchers
|
||||
|
||||
---
|
||||
|
||||
*Architecture Overview v1.0 — Start here before reading category-specific developer docs.*
|
||||
|
||||
Reference in New Issue
Block a user