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:
21
CONTEXT.md
21
CONTEXT.md
@@ -12,6 +12,7 @@ Single Source of Truth for the Unreal Engine 5.5-5.7 Blueprint-based Modular Gam
|
||||
- **State:** [`BPC_StateManager`](docs/architecture/bpc-statemanager.md) — Central state authority (42 exclusive action states, 18 overlay states). Systems query `IsActionPermitted(Tag)` instead of checking other systems directly.
|
||||
- **Animation:** GASP Motion Matching + overlay notifies. Full catalog in [`docs/architecture/animation-catalog.md`](docs/architecture/animation-catalog.md)
|
||||
- **Audio:** 150+ sound triggers + 14-surface material table. Full catalog in [`docs/architecture/sound-catalog.md`](docs/architecture/sound-catalog.md)
|
||||
- **Networking:** Server-authoritative replication model. Full architecture in [`docs/architecture/multiplayer-networking.md`](docs/architecture/multiplayer-networking.md)
|
||||
|
||||
## Directory Structure
|
||||
```
|
||||
@@ -91,13 +92,14 @@ docs/
|
||||
09-ai-systems.md # AI, perception & encounters explained
|
||||
10-adaptive-systems.md # Adaptive environment & atmosphere explained
|
||||
11-16-systems.md # Meta, Settings, Polish, Data Assets, Input, State explained
|
||||
architecture/ # Architecture & Design Documents (6 files)
|
||||
architecture/ # Architecture & Design Documents (7 files)
|
||||
bpc-statemanager.md # BPC_StateManager full spec + Chooser Table Audit
|
||||
metasounds-audio-system.md # MetaSounds audio architecture (mix buses, room zones, settings)
|
||||
animation-catalog.md # Animation requirements for all 135 systems
|
||||
sound-catalog.md # Sound/audio requirements for all 135 systems
|
||||
enhanced-input-system.md # Enhanced Input System architecture
|
||||
hud-overview.md # HUD system architecture — 14 widgets, wiring, integration points
|
||||
multiplayer-networking.md # Multiplayer networking architecture — authority model, RPCs, prediction
|
||||
CLEAN_SLATE_PLAN.md # Clean slate refactoring plan
|
||||
reports/ # Condensed audit reports
|
||||
blueprint_condensed_summary.md # ASK agent audit of all 129 files
|
||||
@@ -106,7 +108,7 @@ docs/
|
||||
enhanced-input-system.md
|
||||
bpc-statemanager.md # NEW — State Manager implementation checklist
|
||||
```
|
||||
**Total: 135 numbered Blueprint files + 5 enums + 5 Data Assets + TEMPLATE.md + AUDIT_REPORT.md + INDEX.md + 11 developer docs + 6 architecture docs + 1 audit report = 164 files in 18 directory groups**
|
||||
**Total: 135 numbered Blueprint files + 5 enums + 5 Data Assets + TEMPLATE.md + AUDIT_REPORT.md + INDEX.md + 11 developer docs + 7 architecture docs + 1 audit report = 165 files in 18 directory groups**
|
||||
|
||||
## Naming Conventions
|
||||
| Prefix | Type |
|
||||
@@ -143,6 +145,7 @@ docs/
|
||||
12. **State Gating via Data Asset** — All gating rules in `DA_StateGatingTable`. Designers modify rules without touching blueprints.
|
||||
13. **Force Stack Pattern** — Death, cutscenes, void space push state onto a force stack; `RestorePreviousState()` pops back.
|
||||
14. **Animation Notify Contract** — 14 named notifies required in montages for framework synchronization (see [`animation-catalog.md`](docs/architecture/animation-catalog.md)).
|
||||
15. **Server-Authoritative Replication** — All state mutations gated by `HasAuthority()`. Clients request via `Server_` RPCs; servers validate and replicate via `RepNotify`. See [`multiplayer-networking.md`](docs/architecture/multiplayer-networking.md).
|
||||
|
||||
## Build Order (Dependency-Safe)
|
||||
- **Phase 0:** Foundation + Input (01-core, 15-input — 8 systems)
|
||||
@@ -161,7 +164,7 @@ docs/
|
||||
- **Phase 13:** Polish (13-polish, 9 systems)
|
||||
- **Phase 14:** State Management (BPC_StateManager + 4 enums + 3 structs + DA_StateGatingTable — 130, 131)
|
||||
- **Phase 15:** MetaSounds Audio (SS_AudioManager + BP_RoomAudioZone + DA_AudioSettings + DA_RoomAcousticPreset — 132-135)
|
||||
- **Phase 16:** Integration Pass — All systems updated to query `BPC_StateManager.IsActionPermitted()` instead of direct state checks. All audio calls routed through `SS_AudioManager` instead of `UGameplayStatics::PlaySound*`.
|
||||
- **Phase 16:** Multiplayer Networking — All systems updated with `HasAuthority()` gates, `Server_` RPCs, `RepNotify` handlers, and client prediction patterns. See [`docs/architecture/multiplayer-networking.md`](docs/architecture/multiplayer-networking.md).
|
||||
|
||||
## Key Communication Rules
|
||||
1. Gameplay Tags + Subsystem lookup (global, decoupled)
|
||||
@@ -199,9 +202,21 @@ No PR is accepted without these files being current. This ensures the animator,
|
||||
- **Deprecated:** `BPC_AudioAtmosphereController` (95) is phased out in favor of `SS_AudioManager`.
|
||||
- **Full Spec:** See [`docs/architecture/metasounds-audio-system.md`](docs/architecture/metasounds-audio-system.md)
|
||||
|
||||
## Multiplayer Networking Conventions
|
||||
- **Authority Model:** Server-authoritative. All state mutations (`ApplyDamage`, `AddItem`, `SetDoorState`) execute on the server with `HasAuthority()` gate. Clients request state changes via `Server_` RPCs.
|
||||
- **RPC Naming:** `Server_` (Client→Server), `Multicast_` (Server→All Clients), `Client_` (Server→Specific Client). All reliable unless marked otherwise.
|
||||
- **RepNotify Pattern:** All replicated variables use `RepNotify` with `OnRep_` handlers that fire the same event dispatchers single-player code already binds to. UI widgets, audio, and effects need zero changes for multiplayer.
|
||||
- **Client Prediction:** Cosmetic effects (muzzle flash, recoil, camera shake) play immediately on client. State values (health, ammo, stamina) are predicted but corrected via `RepNotify` if server disagrees.
|
||||
- **Inventory Authority:** Server validates all add/remove/transfer operations against slot space, weight capacity, and stack limits. Client predicts UI; server corrects via `OnRep_Slots`.
|
||||
- **AI Server-Only:** Behavior trees run on server. Position/rotation/animations replicate via standard Actor replication. Perception events replicate for client awareness indicators.
|
||||
- **UI Local Only:** All `WBP_*` widgets are local per-client. They bind to replicated dispatchers — no networking code in widgets.
|
||||
- **Anti-Cheat:** Server validates all state-changing RPCs. Never trust client-provided values (damage amount, item quantity, target actor). Re-validate conditions server-side.
|
||||
- **Full Spec:** See [`docs/architecture/multiplayer-networking.md`](docs/architecture/multiplayer-networking.md)
|
||||
|
||||
## Clean Slate Refactoring Status
|
||||
- **Branch:** `refactor/clean-slate`
|
||||
- **Phases 1-7:** COMPLETE — all 127 files created, renamed, reorganized, renumbered
|
||||
- **Phase 8-13:** COMPLETE — AUDIT_REPORT updated, CONTEXT.md updated, verification, final commit
|
||||
- **Phase 14-15:** COMPLETE — State Management (130-131) + MetaSounds Audio (132-135) blueprint specs created
|
||||
- **Phase 16:** IN PROGRESS — Multiplayer Networking: all 135 blueprint specs being updated with replication stubs, RPC definitions, and server-authoritative patterns. Developer docs updated. Architecture doc created at [`docs/architecture/multiplayer-networking.md`](docs/architecture/multiplayer-networking.md)
|
||||
- **Remaining:** Cross-reference pass across all 135 files; deprecated BPC_AudioAtmosphereController (95) references to update
|
||||
Reference in New Issue
Block a user