[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M792MJX0T8MAFGPCVEPBJC9N":3,"skill-same:01M792MJX0T8MAFGPCVEPBJC9N":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M792MJX0T8MAFGPCVEPBJC9N","unreal-multiplayer",null,"Build Actor replication, GameMode\u002FGameState architecture and server-authoritative gameplay. Use when building Unreal networking, actor replication, or RPCs.","poorvith-mp\u002Fskills-gamedev","poorvith-mp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F277478855?v=4","01M78Z5K0YH1Z3PX815PGQ96ND","Poorvith M P","01M792GVN0NZ9V49H6Q6BE3S1S",5,"MIT","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-multiplayer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: unreal-multiplayer\nlast_reviewed: 2026-09-06\ngroup: Unreal\ndescription: >-\n  Build Actor replication, GameMode\u002FGameState architecture and server-authoritative gameplay. Use\n  when building Unreal networking, actor replication, or RPCs.\n---\n\n# unreal-multiplayer\n\n## Core Philosophy\nUnreal Engine was built from its inception in 1998 as a multiplayer tournament engine. Networking in Unreal is deeply opinionated: it centers around a strict **Server-Authoritative Client-Server architecture** orchestrated by the GameMode, GameState, PlayerState, and PlayerController classes. The server runs the definitive physical simulation; clients are visual and audio playback terminals that send player intent. Master Unreal multiplayer by understanding the Actor Replication lifecycle, property replication with `DOREPLIFETIME`, and the strict division between Multicast, Client, and Server RPCs.\n\n---\n\n## 4-Step Unreal Multiplayer Architecture\n\n### Step 1: The Core Gameplay Framework Classes\n1. **GameMode (Server Only)**:\n   - Exists exclusively on the authoritative server. Defines match rules, win conditions, player spawning (`SpawnDefaultPawnAtTransform`), and score tracking. Never replicated to clients.\n2. **GameState (Server $\\to$ All Clients)**:\n   - Replicated to all machines. Tracks match state (Round time, Team scores, Match phase: *WaitingToStart, InProgress, PostMatch*).\n3. **PlayerState (Server $\\to$ All Clients)**:\n   - Replicated to all machines. Tracks individual player attributes (Player Name, Ping, Kills, Current Score).\n4. **PlayerController (Server $\\leftrightarrow$ Owning Client)**:\n   - Exists on the server and the *specific owning client*. Handles input translation, UI HUD management, and secure Server RPC communication.\n\n### Step 2: Actor & Property Replication (`DOREPLIFETIME`)\n1. **Actor Replication Setup**:\n   - `bReplicates = true` in constructor.\n   - `SetReplicateMovement(true)` for physical actors.\n2. **Replicated Properties (`ReplicatedUsing`)**:\n   - Replicate variables using `UPROPERTY(ReplicatedUsing = OnRep_Health)`.\n   - Implement `GetLifetimeReplicatedProps`:\n     ```cpp\n     void ACharacterBase::GetLifetimeReplicatedProps(TArray\u003CFLifetimeProperty>& OutLifetimeProps) const {\n         Super::GetLifetimeReplicatedProps(OutLifetimeProps);\n         DOREPLIFETIME(ACharacterBase, Health);\n         DOREPLIFETIME_CONDITION(ACharacterBase, SecretInventory, COND_OwnerOnly);\n     }\n     ```\n3. **RepNotify Functions**:\n   - `OnRep_Health()` executes automatically on clients whenever the server updates `Health`.\n\n### Step 3: Remote Procedure Call (RPC) Classification\n1. **Server RPC (`Server, Reliable, WithValidation`)**:\n   - Called by Owning Client $\\to$ Executed on Server.\n   - Must implement `_Validate` (Security gate) and `_Implementation`:\n     ```cpp\n     bool AWeapon::ServerFire_Validate(FVector AimDir) { return AimDir.IsNormalized(); }\n     void AWeapon::ServerFire_Implementation(FVector AimDir) { \u002F* Authoritative Fire *\u002F }\n     ```\n2. **Client RPC (`Client, Reliable`)**:\n   - Called by Server $\\to$ Executed on Owning Client only (e.g. *ClientShowHitMarker*).\n3. **NetMulticast RPC (`NetMulticast, Unreliable`)**:\n   - Called by Server $\\to$ Executed on Server and *all* simulated clients (e.g. *MulticastPlayExplosionFX*).\n\n### Step 4: Network Relevancy & Dormancy Optimization\n1. **Network Relevancy (`IsNetRelevantFor`)**:\n   - Actors beyond view distance or hidden behind terrain are not replicated to distant clients, conserving network bandwidth.\n2. **Net Dormancy (`DORM_DormantAll`)**:\n   - Static or rarely changing world actors (chests, switches) are set dormant until an event wakes them up, saving server tick budget.\n\n---\n\n## Deliverable Format: Authoritative Server-Validated Weapon Firing (C++)\n\n```cpp\n\u002F\u002F Weapon.h\n#pragma once\n#include \"CoreMinimal.h\"\n#include \"GameFramework\u002FActor.h\"\n#include \"Weapon.generated.h\"\n\nUCLASS()\nclass AWeapon : public AActor {\n    GENERATED_BODY()\n\npublic:\n    AWeapon();\n\n    UPROPERTY(ReplicatedUsing = OnRep_AmmoCount, BlueprintReadOnly)\n    int32 AmmoCount;\n\n    UFUNCTION()\n    void OnRep_AmmoCount();\n\n    UFUNCTION(Server, Reliable, WithValidation)\n    void ServerFire(FVector_NetQuantize TraceStart, FVector_NetQuantizeNormal AimDir);\n\n    UFUNCTION(NetMulticast, Unreliable)\n    void MulticastSpawnMuzzleFX();\n\nprotected:\n    virtual void GetLifetimeReplicatedProps(TArray\u003CFLifetimeProperty>& OutLifetimeProps) const override;\n};\n```\n\n---\n\n## Worked Example: Mitigating Dedicated Server Bandwidth Saturation\n\n- **Context**: A 32-player Unreal shooter was experiencing severe packet drops and server tick degradation down to 14 Hz during firefights.\n- **Diagnosis**: Using `NetProfile` and `Network Insights`, engineers discovered weapon firing was using `Reliable` NetMulticast RPCs and replicating unquantized 64-bit vector coordinates 30 times per second.\n- **Optimization**:\n  1. Converted `FVector` to `FVector_NetQuantize` (16-bit integer compression).\n  2. Changed cosmetic FX RPCs from `Reliable` to `Unreliable`.\n  3. Activated Net Dormancy on 800 static interactive loot containers in the map.\n- **Outcome**: Server bandwidth per client decreased by 68%; server tick rate stabilized at 60 Hz.\n\n---\n\n## Verification Checklist\n\n- [ ] GameMode contains zero client-side logic and is never accessed from client HUDs.\n- [ ] All Server RPCs implement `_Validate()` security checks to prevent packet injection.\n- [ ] `DOREPLIFETIME_CONDITION` used to prevent sending private data (e.g. inventory) to non-owners.\n- [ ] Cosmetic effects transmitted via `Unreliable` Multicast RPCs.\n- [ ] Net Relevancy distance and Net Dormancy configured for large maps.\n\n---\n\n## Anti-Patterns\n\n- **Calling Server RPCs on Un-Owned Actors**: Invoking a Server RPC from a client on an Actor that is not possessed or owned by that client's PlayerController (fails silently).\n- **Using Reliable RPCs for Frequent Ticks**: Marking high-frequency weapon fire or footstep RPCs as `Reliable`, causing TCP-style packet queues when latency spikes.\n- **Accessing `AGameMode` on Clients**: Writing `GetWorld()->GetAuthGameMode()` inside client UI widgets, which returns `nullptr` on non-server machines.\n","# unreal-multiplayer\n\n## Core Philosophy\nUnreal Engine was built from its inception in 1998 as a multiplayer tournament engine. Networking in Unreal is deeply opinionated: it centers around a strict **Server-Authoritative Client-Server architecture** orchestrated by the GameMode, GameState, PlayerState, and PlayerController classes. The server runs the definitive physical simulation; clients are visual and audio playback terminals that send player intent. Master Unreal multiplayer by understanding the Actor Replication lifecycle, property replication with `DOREPLIFETIME`, and the strict division between Multicast, Client, and Server RPCs.\n\n---\n\n## 4-Step Unreal Multiplayer Architecture\n\n### Step 1: The Core Gameplay Framework Classes\n1. **GameMode (Server Only)**:\n   - Exists exclusively on the authoritative server. Defines match rules, win conditions, player spawning (`SpawnDefaultPawnAtTransform`), and score tracking. Never replicated to clients.\n2. **GameState (Server $\\to$ All Clients)**:\n   - Replicated to all machines. Tracks match state (Round time, Team scores, Match phase: *WaitingToStart, InProgress, PostMatch*).\n3. **PlayerState (Server $\\to$ All Clients)**:\n   - Replicated to all machines. Tracks individual player attributes (Player Name, Ping, Kills, Current Score).\n4. **PlayerController (Server $\\leftrightarrow$ Owning Client)**:\n   - Exists on the server and the *specific owning client*. Handles input translation, UI HUD management, and secure Server RPC communication.\n\n### Step 2: Actor & Property Replication (`DOREPLIFETIME`)\n1. **Actor Replication Setup**:\n   - `bReplicates = true` in constructor.\n   - `SetReplicateMovement(true)` for physical actors.\n2. **Replicated Properties (`ReplicatedUsing`)**:\n   - Replicate variables using `UPROPERTY(ReplicatedUsing = OnRep_Health)`.\n   - Implement `GetLifetimeReplicatedProps`:\n     ```cpp\n     void ACharacterBase::GetLifetimeReplicatedProps(TArray\u003CFLifetimeProperty>& OutLifetimeProps) const {\n         Super::GetLifetimeReplicatedProps(OutLifetimeProps);\n         DOREPLIFETIME(ACharacterBase, Health);\n         DOREPLIFETIME_CONDITION(ACharacterBase, SecretInventory, COND_OwnerOnly);\n     }\n     ```\n3. **RepNotify Functions**:\n   - `OnRep_Health()` executes automatically on clients whenever the server updates `Health`.\n\n### Step 3: Remote Procedure Call (RPC) Classification\n1. **Server RPC (`Server, Reliable, WithValidation`)**:\n   - Called by Owning Client $\\to$ Executed on Server.\n   - Must implement `_Validate` (Security gate) and `_Implementation`:\n     ```cpp\n     bool AWeapon::ServerFire_Validate(FVector AimDir) { return AimDir.IsNormalized(); }\n     void AWeapon::ServerFire_Implementation(FVector AimDir) { \u002F* Authoritative Fire *\u002F }\n     ```\n2. **Client RPC (`Client, Reliable`)**:\n   - Called by Server $\\to$ Executed on Owning Client only (e.g. *ClientShowHitMarker*).\n3. **NetMulticast RPC (`NetMulticast, Unreliable`)**:\n   - Called by Server $\\to$ Executed on Server and *all* simulated clients (e.g. *MulticastPlayExplosionFX*).\n\n### Step 4: Network Relevancy & Dormancy Optimization\n1. **Network Relevancy (`IsNetRelevantFor`)**:\n   - Actors beyond view distance or hidden behind terrain are not replicated to distant clients, conserving network bandwidth.\n2. **Net Dormancy (`DORM_DormantAll`)**:\n   - Static or rarely changing world actors (chests, switches) are set dormant until an event wakes them up, saving server tick budget.\n\n---\n\n## Deliverable Format: Authoritative Server-Validated Weapon Firing (C++)\n\n```cpp\n\u002F\u002F Weapon.h\n#pragma once\n#include \"CoreMinimal.h\"\n#include \"GameFramework\u002FActor.h\"\n#include \"Weapon.generated.h\"\n\nUCLASS()\nclass AWeapon : public AActor {\n    GENERATED_BODY()\n\npublic:\n    AWeapon();\n\n    UPROPERTY(ReplicatedUsing = OnRep_AmmoCount, BlueprintReadOnly)\n    int32 AmmoCount;\n\n    UFUNCTION()\n    void OnRep_AmmoCount();\n\n    UFUNCTION(Server, Reliable, WithValidation)\n    void ServerFire(FVector_NetQuantize TraceStart, FVector_NetQuantizeNormal AimDir);\n\n    UFUNCTION(NetMulticast, Unreliable)\n    void MulticastSpawnMuzzleFX();\n\nprotected:\n    virtual void GetLifetimeReplicatedProps(TArray\u003CFLifetimeProperty>& OutLifetimeProps) const override;\n};\n```\n\n---\n\n## Worked Example: Mitigating Dedicated Server Bandwidth Saturation\n\n- **Context**: A 32-player Unreal shooter was experiencing severe packet drops and server tick degradation down to 14 Hz during firefights.\n- **Diagnosis**: Using `NetProfile` and `Network Insights`, engineers discovered weapon firing was using `Reliable` NetMulticast RPCs and replicating unquantized 64-bit vector coordinates 30 times per second.\n- **Optimization**:\n  1. Converted `FVector` to `FVector_NetQuantize` (16-bit integer compression).\n  2. Changed cosmetic FX RPCs from `Reliable` to `Unreliable`.\n  3. Activated Net Dormancy on 800 static interactive loot containers in the map.\n- **Outcome**: Server bandwidth per client decreased by 68%; server tick rate stabilized at 60 Hz.\n\n---\n\n## Verification Checklist\n\n- [ ] GameMode contains zero client-side logic and is never accessed from client HUDs.\n- [ ] All Server RPCs implement `_Validate()` security checks to prevent packet injection.\n- [ ] `DOREPLIFETIME_CONDITION` used to prevent sending private data (e.g. inventory) to non-owners.\n- [ ] Cosmetic effects transmitted via `Unreliable` Multicast RPCs.\n- [ ] Net Relevancy distance and Net Dormancy configured for large maps.\n\n---\n\n## Anti-Patterns\n\n- **Calling Server RPCs on Un-Owned Actors**: Invoking a Server RPC from a client on an Actor that is not possessed or owned by that client's PlayerController (fails silently).\n- **Using Reliable RPCs for Frequent Ticks**: Marking high-frequency weapon fire or footstep RPCs as `Reliable`, causing TCP-style packet queues when latency spikes.\n- **Accessing `AGameMode` on Clients**: Writing `GetWorld()->GetAuthGameMode()` inside client UI widgets, which returns `nullptr` on non-server machines.\n",{"name":5,"group":24,"description":7,"last_reviewed":25},"Unreal",1788652800000,"main","d661d370a67c4532034e3d1d87c4aec237077f34","skills\u002Funreal-multiplayer",0,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskillary","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp","poorvithmp.com","Shipping tools for problems people notice too late.","2026-10-02 21:32:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add poorvith-mp\u002Fskills-gamedev --skill unreal-multiplayer",{"tool":42,"command":43},"bunx","bunx skills add poorvith-mp\u002Fskills-gamedev --skill unreal-multiplayer",{"tool":45,"command":46},"pnpm","pnpm dlx skills add poorvith-mp\u002Fskills-gamedev --skill unreal-multiplayer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-multiplayer\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"evals\u002Frouting.yaml","REFERENCE","参考文档",996,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-multiplayer\u002Fevals\u002Frouting.yaml",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"unreal-multiplayer.skill","OTHER","其他",3533,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-multiplayer\u002Funreal-multiplayer.skill",[63,70,77,84,91,98],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M792N6JWJ1J9XBK6HKFHWRHA","unreal-worlds","Build open worlds with World Partition, Landscape, procedural foliage, HLOD and level streaming. Use when sculpting landscapes, biomes, or World Partition in Unreal.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-worlds\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M792N3JHMS0FWY4YJJ4X60PV","unreal-world-builder","Moved to unreal-worlds in skills-gamedev. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-world-builder\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M792N0XGH0E9XK3ZCR34Z18B","unreal-technical-artist","Moved to unreal-tech-art in skills-gamedev. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-technical-artist\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M792MXKCZ26XGP5RDQHDWRWS","unreal-tech-art","Own the UE5 visual pipeline: Material Editor, Niagara VFX and Procedural Content Generation. Use when creating Unreal materials, Niagara visual effects, or Lumen setups.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-tech-art\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M792MRZ9PB1MNFKPNVDB5AJP","unreal-systems","Work the C++\u002FBlueprint continuum with Nanite, Lumen and the Gameplay Ability System. Use when developing Unreal Engine gameplay in C++, Blueprints, or GAS.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-systems\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M792MQGJ5S2EFDAD5BN5B8V3","unreal-systems-engineer","Moved to modernized catalog in skillary. Removed in v4.1.","https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Funreal-systems-engineer\u002FSKILL.md",[],[]]