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:
@@ -136,4 +136,41 @@ Holstered → Equipping → Ready ⇄ Firing → Reloading → Ready
|
||||
|
||||
---
|
||||
|
||||
## Multiplayer Networking
|
||||
|
||||
### Category Authority Map
|
||||
| System | Authority | Client Prediction |
|
||||
|--------|-----------|-------------------|
|
||||
| `BP_WeaponBase` | Server-authoritative state machine | Client predicts fire animation/muzzle flash |
|
||||
| `BPC_AmmoComponent` | Server-authoritative ammo | Client predicts count; server corrects via OnRep |
|
||||
| `BPC_FirearmSystem` | Server performs trace/damage calc | Client predicts tracers; server hit result is canonical |
|
||||
| `BPC_MeleeSystem` | Server validates hit detection | Client predicts swing animation |
|
||||
| `BPC_ReloadSystem` | Server validates reload | Client predicts animation; server validates ammo state |
|
||||
| `BPC_RecoilSystem` | **Local only** | Recoil is cosmetic; no replication needed |
|
||||
| `BPC_DamageReceptionSystem` | Server calculates damage | HealthSystem is authoritative |
|
||||
| `BPC_HitReactionSystem` | Server triggers → multicast animation | All clients see flinch/stagger |
|
||||
| `BPC_CombatFeedbackComponent` | **Local only** | Hit markers, kill confirm are per-client |
|
||||
| `BPC_ShieldDefenseSystem` | Server validates block/parry | Shield state replicated |
|
||||
|
||||
### Weapon Fire Flow (Multiplayer)
|
||||
```
|
||||
Client presses Fire:
|
||||
1. Client predicts: play fire anim, muzzle flash, recoil immediately
|
||||
2. Client calls Server_StartFire() RPC
|
||||
3. Server validates: weapon state Ready, has ammo, not on cooldown
|
||||
4. Server: trace/damage calc, consume ammo → RepNotify ammo to all
|
||||
5. Server: Multicast fire FX to other clients
|
||||
6. Client receives OnRep_Ammo → corrects if prediction was wrong
|
||||
```
|
||||
|
||||
### Server RPCs
|
||||
- `Server_StartFire`, `Server_StopFire`, `Server_StartReload`, `Server_EquipWeapon`, `Server_HolsterWeapon`
|
||||
|
||||
### Anti-Cheat
|
||||
- Server validates fire rate (timer between Server_StartFire calls must exceed weapon fire rate)
|
||||
- Server never trusts client damage calculations — always recalculates from weapon data
|
||||
- Server validates ammo count before allowing fire (prevents infinite ammo cheat)
|
||||
|
||||
---
|
||||
|
||||
*Developer Reference v1.0 — 08 Weapons Systems. Companion to docs/blueprints/08-weapons/ specs.*
|
||||
|
||||
Reference in New Issue
Block a user