[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M792GXA42HTCGAB376ANS6F6":3,"skill-same:01M792GXA42HTCGAB376ANS6F6":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},"01M792GXA42HTCGAB376ANS6F6","anti-cheat",null,"Enforce server authority and defend against speed hacks, memory editing, and exploits. For networking setup, see unity-multiplayer. Use when defending games against exploits or hacks.","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\u002Fanti-cheat\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: anti-cheat\nlast_reviewed: 2026-09-06\ngroup: Engineering\ndescription: Enforce server authority and defend against speed hacks, memory editing, and exploits. For networking setup, see unity-multiplayer. Use when defending games against exploits or hacks.\n---\n\n# anti-cheat\n\n## Core Philosophy\nIn multiplayer games, the client is fundamentally compromised. The game executable runs in a hostile environment controlled by the user: memory can be modified via Cheat Engine, network packets can be intercepted, and GPU rendering pipelines can be injected with custom shaders. True anti-cheat engineering does not rely on invasive kernel drivers alone; it is built on an uncompromising architectural foundation: **Server Authority**. The client only sends input intentions; the authoritative server simulates physics, validates mechanics, and adjudicates reality.\n\n---\n\n## 4-Step Server-Authoritative Anti-Cheat Architecture\n\n### Step 1: Server Authority & Movement Validation\n1. **Never Trust Client Coordinates**:\n   - The client must never send absolute positional updates (`player.position = x, y, z`).\n   - The client sends raw input vectors (Move forward, Jump, Delta time). The server simulates physics and returns authoritative state.\n2. **Speed-Hack & Teleportation Prevention**:\n   - Server tracks positional displacement per tick:\n     $$\\Delta d \\le v_{text{max}}  imes \\Delta t + \\epsilon_{text{threshold}}$$\n   - If displacement exceeds maximum legal speed plus latency buffer, snap the player back to their last validated server position and flag anomalous telemetry.\n3. **Ray-Swept Collision Bounds**:\n   - Verify movement vectors using server-side ray sweeps to prevent clipping through solid geometry (\"noclip\" cheats).\n\n### Step 2: Combat & Action Validation\n1. **Fire Rate & Ammo Accounting**:\n   - Track weapon state strictly on the server: cooldown timer between shots, reload animations, magazine capacity.\n   - Instantly drop firing requests if the time delta between shots is lower than the weapon's configured firing delay.\n2. **Lag Compensation & Rewind Bounds**:\n   - For hitscan weapons, the server maintains a circular buffer of past entity positions (typically 1,000ms).\n   - When a client claims a hit at timestamp $T$, the server rewinds player hitboxes to timestamp $T$, performs a raycast, and validates line-of-sight.\n   - *Security Bound*: Cap maximum backward rewind at **200ms**. If client latency exceeds 200ms, hits are rejected to prevent players behind cover from being shot by lagging clients.\n\n### Step 3: Statistical Heuristics & Aimbot Detection\n1. **Angular Velocity & Entropy Analysis**:\n   - Human aim exhibits micro-adjustments, tremors, and acceleration\u002Fdeceleration curves.\n   - Aimbots snap instantaneously: angular velocity $ o \\infty$, angular acceleration approaches a single-frame delta, and angular path entropy drops to zero.\n   - Log server-side telemetry on crosshair angular snap speed; flag players who consistently snap within 1 frame across $> 30^\\circ$ angles.\n\n### Step 4: Memory Obfuscation & Heartbeat Integrity\n1. **Encrypted In-Memory Variables**:\n   - Obfuscate high-value memory addresses (Player Health, Ammo, Gold) using dynamic XOR bitmasks changed every game tick.\n2. **Deterministic Simulation Hashes**:\n   - Run cryptographic checksums on loaded map geometry and weapon config tables at match start to detect modified local asset files.\n\n---\n\n## Deliverable Format: Anti-Cheat System Specification (`ANTI-CHEAT-SPEC.md`)\n\n```markdown\n# Server-Authoritative Anti-Cheat Architecture: [Game Title]\n\n## 1. Authority Model & Tick Rates\n- **Server Tick Rate**: 64 Hz (15.625ms per tick)\n- **Authority Scope**: Movement, Combat, Inventory, State Machine (100% Server Authoritative)\n- **Lag Compensation Window**: Capped at 180ms maximum rewind\n\n## 2. Real-Time Input Validation Rules\n| Mechanic | Client Payload | Server Validation Logic | Enforcement Action |\n|---|---|---|---|\n| Movement | Input Vector + View Angles | Swept-sphere collision + max velocity cap | Hard snapback to last valid pos |\n| Fire Weapon | Shoot Event + Target ID | Check ammo count > 0 & cooldown timer expired | Drop packet silently; log warning |\n| Reload | Reload Request | Check reload duration >= 2.4s before resetting ammo | Reset reload progress on interrupt |\n\n## 3. Server-Side Heuristic Detection Thresholds\n- **Snap Angle**: > 45° angular displacement in \u003C= 1 frame (15.6ms).\n- **Hit Ratio**: Headshot ratio > 78% across 10 consecutive matches triggers manual review.\n- **Speed Variance**: Accumulated distance delta > 1.15x theoretical max over 3 seconds.\n```\n\n---\n\n## Worked Example: Stopping Speed Hacks in a Fast-Paced Shooter\n\n- **Exploit**: Cheaters modified client `Time.timeScale` to move 3x faster than normal players.\n- **Server Fix**: Implemented server-side distance delta accumulation over rolling 20-tick windows.\n- **Result**: Cheaters were clamped to legal speed caps and rubber-banded backward; exploit neutralized with zero false-positive kicks for high-ping players.\n\n---\n\n## Verification Checklist\n\n- [ ] All positional movement and combat actions adjudicated on the server.\n- [ ] Lag compensation rewinds capped at $\\le 200text{ms}$.\n- [ ] Weapon fire rates, reload timers, and ammo pools tracked server-side.\n- [ ] Heuristic telemetry detects unnatural angular snap velocities.\n- [ ] Asset checksums verify local map and weapon files before match entry.\n\n---\n\n## Anti-Patterns\n\n- **Client-Authoritative Hits**: Trusting the client when it sends \"I hit Player B for 100 damage\", inviting trivial memory-injection cheats.\n- **Unbounded Lag Compensation**: Letting 500ms ping players shoot people who ran behind concrete walls 2 seconds ago.\n- **Client-Only Anti-Cheat**: Relying exclusively on client-side scanning software without server-side validation.\n","# anti-cheat\n\n## Core Philosophy\nIn multiplayer games, the client is fundamentally compromised. The game executable runs in a hostile environment controlled by the user: memory can be modified via Cheat Engine, network packets can be intercepted, and GPU rendering pipelines can be injected with custom shaders. True anti-cheat engineering does not rely on invasive kernel drivers alone; it is built on an uncompromising architectural foundation: **Server Authority**. The client only sends input intentions; the authoritative server simulates physics, validates mechanics, and adjudicates reality.\n\n---\n\n## 4-Step Server-Authoritative Anti-Cheat Architecture\n\n### Step 1: Server Authority & Movement Validation\n1. **Never Trust Client Coordinates**:\n   - The client must never send absolute positional updates (`player.position = x, y, z`).\n   - The client sends raw input vectors (Move forward, Jump, Delta time). The server simulates physics and returns authoritative state.\n2. **Speed-Hack & Teleportation Prevention**:\n   - Server tracks positional displacement per tick:\n     $$\\Delta d \\le v_{text{max}}  imes \\Delta t + \\epsilon_{text{threshold}}$$\n   - If displacement exceeds maximum legal speed plus latency buffer, snap the player back to their last validated server position and flag anomalous telemetry.\n3. **Ray-Swept Collision Bounds**:\n   - Verify movement vectors using server-side ray sweeps to prevent clipping through solid geometry (\"noclip\" cheats).\n\n### Step 2: Combat & Action Validation\n1. **Fire Rate & Ammo Accounting**:\n   - Track weapon state strictly on the server: cooldown timer between shots, reload animations, magazine capacity.\n   - Instantly drop firing requests if the time delta between shots is lower than the weapon's configured firing delay.\n2. **Lag Compensation & Rewind Bounds**:\n   - For hitscan weapons, the server maintains a circular buffer of past entity positions (typically 1,000ms).\n   - When a client claims a hit at timestamp $T$, the server rewinds player hitboxes to timestamp $T$, performs a raycast, and validates line-of-sight.\n   - *Security Bound*: Cap maximum backward rewind at **200ms**. If client latency exceeds 200ms, hits are rejected to prevent players behind cover from being shot by lagging clients.\n\n### Step 3: Statistical Heuristics & Aimbot Detection\n1. **Angular Velocity & Entropy Analysis**:\n   - Human aim exhibits micro-adjustments, tremors, and acceleration\u002Fdeceleration curves.\n   - Aimbots snap instantaneously: angular velocity $ o \\infty$, angular acceleration approaches a single-frame delta, and angular path entropy drops to zero.\n   - Log server-side telemetry on crosshair angular snap speed; flag players who consistently snap within 1 frame across $> 30^\\circ$ angles.\n\n### Step 4: Memory Obfuscation & Heartbeat Integrity\n1. **Encrypted In-Memory Variables**:\n   - Obfuscate high-value memory addresses (Player Health, Ammo, Gold) using dynamic XOR bitmasks changed every game tick.\n2. **Deterministic Simulation Hashes**:\n   - Run cryptographic checksums on loaded map geometry and weapon config tables at match start to detect modified local asset files.\n\n---\n\n## Deliverable Format: Anti-Cheat System Specification (`ANTI-CHEAT-SPEC.md`)\n\n```markdown\n# Server-Authoritative Anti-Cheat Architecture: [Game Title]\n\n## 1. Authority Model & Tick Rates\n- **Server Tick Rate**: 64 Hz (15.625ms per tick)\n- **Authority Scope**: Movement, Combat, Inventory, State Machine (100% Server Authoritative)\n- **Lag Compensation Window**: Capped at 180ms maximum rewind\n\n## 2. Real-Time Input Validation Rules\n| Mechanic | Client Payload | Server Validation Logic | Enforcement Action |\n|---|---|---|---|\n| Movement | Input Vector + View Angles | Swept-sphere collision + max velocity cap | Hard snapback to last valid pos |\n| Fire Weapon | Shoot Event + Target ID | Check ammo count > 0 & cooldown timer expired | Drop packet silently; log warning |\n| Reload | Reload Request | Check reload duration >= 2.4s before resetting ammo | Reset reload progress on interrupt |\n\n## 3. Server-Side Heuristic Detection Thresholds\n- **Snap Angle**: > 45° angular displacement in \u003C= 1 frame (15.6ms).\n- **Hit Ratio**: Headshot ratio > 78% across 10 consecutive matches triggers manual review.\n- **Speed Variance**: Accumulated distance delta > 1.15x theoretical max over 3 seconds.\n```\n\n---\n\n## Worked Example: Stopping Speed Hacks in a Fast-Paced Shooter\n\n- **Exploit**: Cheaters modified client `Time.timeScale` to move 3x faster than normal players.\n- **Server Fix**: Implemented server-side distance delta accumulation over rolling 20-tick windows.\n- **Result**: Cheaters were clamped to legal speed caps and rubber-banded backward; exploit neutralized with zero false-positive kicks for high-ping players.\n\n---\n\n## Verification Checklist\n\n- [ ] All positional movement and combat actions adjudicated on the server.\n- [ ] Lag compensation rewinds capped at $\\le 200text{ms}$.\n- [ ] Weapon fire rates, reload timers, and ammo pools tracked server-side.\n- [ ] Heuristic telemetry detects unnatural angular snap velocities.\n- [ ] Asset checksums verify local map and weapon files before match entry.\n\n---\n\n## Anti-Patterns\n\n- **Client-Authoritative Hits**: Trusting the client when it sends \"I hit Player B for 100 damage\", inviting trivial memory-injection cheats.\n- **Unbounded Lag Compensation**: Letting 500ms ping players shoot people who ran behind concrete walls 2 seconds ago.\n- **Client-Only Anti-Cheat**: Relying exclusively on client-side scanning software without server-side validation.\n",{"name":5,"group":24,"description":7,"last_reviewed":25},"Engineering",1788652800000,"main","d661d370a67c4532034e3d1d87c4aec237077f34","skills\u002Fanti-cheat",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 anti-cheat",{"tool":42,"command":43},"bunx","bunx skills add poorvith-mp\u002Fskills-gamedev --skill anti-cheat",{"tool":45,"command":46},"pnpm","pnpm dlx skills add poorvith-mp\u002Fskills-gamedev --skill anti-cheat","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Fanti-cheat\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"anti-cheat.skill","OTHER","其他",3607,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Fanti-cheat\u002Fanti-cheat.skill",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"evals\u002Frouting.yaml","REFERENCE","参考文档",974,"https:\u002F\u002Fgithub.com\u002Fpoorvith-mp\u002Fskills-gamedev\u002Fblob\u002Fmain\u002Fskills\u002Fanti-cheat\u002Fevals\u002Frouting.yaml",[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",[],[]]