$npx -y skills add thedivergentai/GD-Agentic-Skills --skill godot-genre-shooter-fpsExpert blueprint for First-Person Shooters (Doom, Quake, Battlefield, Overwatch) focusing on physics-based movement, acceleration/friction, camera sway, weapon bobbing, and high-precision hit registration. Use when building tight, responsive FPS combat with advanced camera mechan
| 1 | ## Godot 4.7 Baseline |
| 2 | |
| 3 | - Expert patterns in this skill target **Godot 4.7+** (stable, 2026-06-18). |
| 4 | - Consult the [Godot 4.7 migration guide](https://docs.godotengine.org/en/4.7/tutorials/migrating/upgrading_to_godot_4.7.html) when upgrading projects from 4.6. |
| 5 | - **NEVER** assume 4.6 defaults (stretch mode, audio area_mask, RichTextLabel percent flags) without checking 4.7 migration notes. |
| 6 | |
| 7 | # Genre: Shooter (FPS/TPS) |
| 8 | |
| 9 | Gunplay feel, responsive combat, and competitive balance define shooters. |
| 10 | |
| 11 | ## NEVER Do (Expert Anti-Patterns) |
| 12 | |
| 13 | ### Gunplay & Hit Registration |
| 14 | - NEVER use `_process()` for hit detection; strictly use `_physics_process()` to maintain frame-rate independent accuracy. |
| 15 | - NEVER apply recoil to the physical weapon model; strictly apply it to **Camera Rotation (kick)** and **Weapon Bloom (spread)**. |
| 16 | - NEVER trust the client for hit registration in multiplayer; strictly use **Server-Authoritative** validation with lag compensation. |
| 17 | - NEVER synchronize every bullet over the network; strictly use **Client-Side Prediction** and send only initial "Fire" events. |
| 18 | - NEVER use `Area3D` or `move_and_collide()` for high-speed ballistics; strictly use `PhysicsDirectSpaceState3D.intersect_ray()` for 100x better performance. |
| 19 | - NEVER forget to exclude the player's own RID from hitscan raycasts; otherwise, shots will collide instantly with the barrel. |
| 20 | - NEVER use exact floating-point equality (==) for weapon cooldowns or timers; strictly use `is_equal_approx()`. |
| 21 | |
| 22 | ### Performance & Polish |
| 23 | - NEVER use a single `AudioStreamPlayer` for gunfire; strictly use **Layered Audio** (Mechanical + Shot + Reverb Tail). |
| 24 | - NEVER instantiate and `free()` hundreds of projectile nodes; strictly use **Object Pooling** or the `RenderingServer`. |
| 25 | - NEVER use `Sprite3D` or `QuadMesh` for bullet impacts; strictly use the **Decal** node for surface-conforming texture projection. |
| 26 | - NEVER leave decals in the scene indefinitely; strictly implement a fade-out and cleanup cycle. |
| 27 | - NEVER use `Transform3D.looking_at()` for forward shooting vectors; strictly extract the direction from `-transform.basis.z`. |
| 28 | - NEVER multiply velocity by `delta` before `move_and_slide()`; the method internalizes the timestep automatically. |
| 29 | |
| 30 | ### Input & Architecture |
| 31 | - NEVER poll mouse motion inside `_physics_process()`; strictly use `_input()` for zero-latency camera look. |
| 32 | - NEVER accumulate mouse rotation directly onto a `Transform3D`; strictly store **Yaw/Pitch variables** to avoid gimbal lock. |
| 33 | - NEVER hardcode weapon statistics (Damage, Recoil) inside logic; strictly use **Resource-based WeaponData** for balancing. |
| 34 | - NEVER tightly couple damage logic to specific classes; strictly use **Duck-Typing** (`has_method("take_damage")`) for environment interactivity. |
| 35 | - NEVER use standard Strings for high-frequency state identifiers; strictly use `StringName` (e.g., `&"reloading"`). |
| 36 | - NEVER use the `!` (NOT) operator in AnimationTree expressions; strictly use `is_firing == false`. |
| 37 | - NEVER connect weapon signals via string-based calls; strictly use **Signal-Object syntax** (`fired.connect`). |
| 38 | |
| 39 | --- |
| 40 | |
| 41 | ## 🛠 Expert Components (scripts/) |
| 42 | |
| 43 | ### Original Expert Patterns |
| 44 | - [advanced_weapon_controller.gd](scripts/advanced_weapon_controller.gd) - Professional-grade weapon system with deterministic recoil, bloom, and dual hitscan/projectile modes. |
| 45 | |
| 46 | ### Modular Components |
| 47 | - [fps_camera_look.gd](scripts/fps_camera_look.gd) - Asynchronous mouse look for zero-latency aiming using raw input. |
| 48 | - [hitscan_weapon_query.gd](scripts/hitscan_weapon_query.gd) - Nodeless physics raycast pattern for instant hit registration. |
| 49 | - [fps_movement_logic.gd](scripts/fps_movement_logic.gd) - Physics-based movement with acceleration, friction, and gravity scaling. |
| 50 | - [weapon_bobbing_system.gd](scripts/weapon_bobbing_system.gd) - Procedural bobbing and sway using sine-wave oscillation. |
| 51 | - [bullet_decal_spawner.gd](scripts/bullet_decal_spawner.gd) - Dynamic surface decal projection for impact effects. |
| 52 | - [weapon_spread_calc.gd](scripts/weapon_spread_calc.gd) - Gaussian/Normal distribution logic for bullet clustering. |
| 53 | - [server_projectile_instance.gd](scripts/server_projectile_instance.gd) - High-volume visual bullets using RenderingServer RIDs. |
| 54 | - [weapon_state_machine.gd](scripts/weapon_state_machine.gd) - Optimized state transitions for fire, reload, and idle. |
| 55 | - [player_anim_bridge.gd](scripts/player_anim_bridge.gd) - Local velocity bridge for syncing movement with AnimationTree. |
| 56 | - [frame_perfect_input.gd](scripts/frame_perfect_input.gd) - Buffered semi-automatic input handling to prevent |