All skills
thedivergentai avatar

/godot-genre-shooter-fps

@9d6e91e

Expert blueprint for First-Person Shooters: fps_camera_look, fps_movement_logic, hitscan_weapon_query, weapon_bobbing_system, procedural recoil, and FPS NEVER rules. Shared TPS/cover theory links to godot-genre-shooter. Keywords: FPS, movement physics, weapon bobbing, camera sway, hitscan, viewmodel, air control.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-genre-shooter-fps

This session only. Nothing lands on disk.

referencesfps-weapon-theory.md

≈789 tokens on demand. Your agent reads this file only when SKILL.md points to it.

FPS Weapon Theory (load on demand)

MANDATORY when implementing hitscan vs projectile tradeoffs, three-layer recoil, aim assist, net prediction, or weapon balance matrices beyond MANDATORY script reads.

Hitscan vs projectile

Mode Use Script
Hitscan Pistols, ARs, snipers — instant feedback hitscan_weapon_query.gd
Projectile Rockets, grenades — gravity arcs server_projectile_instance.gd (visual RID density)

WHY raycast not Area3D for bullets: PhysicsDirectSpaceState3D.intersect_ray avoids per-bullet nodes at 60+ fire rate. Always exclude the shooter RID or shots hit the barrel instantly.

Muzzle forward: -transform.basis.z — not Transform3D.looking_at().

Three-layer recoil

  1. Visual kick — camera pivot (procedural_recoil_handler.gd)
  2. Pattern offset — learnable spray (recoil_system.gd recoil_pattern array)
  3. Spread bloom — accuracy loss while firing; recover on release

NEVER apply recoil only to the gun mesh — players feel kick on the camera + bloom.

Aim assist (controller)

aim_assist.gd — friction slowdown (≈0.3) within assist_angle + subtle screen-space magnetism (≈0.1). Disable or narrow on PC mouse builds.

Weapon balance decision tree

Archetype Fire rate Damage Implementation
SMG High Low Tight vertical pattern
AR Medium Medium Hitscan default
Shotgun Burst Per-pellet 5–8 pellet spread, <10m effective
Sniper Low High Hitscan + tracer visual
Rocket Low AoE Projectile + gravity

Sim asymmetry matrices in godot-monte-carlo-balancer.

Multiplayer client prediction

CLIENT: play VFX/audio/recoil immediately → rpc_id(1, server_validate_shot, transform)
SERVER: authoritative ray → rpc confirm_hit OR rpc_id(sender, client_cancel_cast)

Server wins on mismatch — show "no reg" feedback. Do not sync every bullet; send fire events only.

Polish checklist

  • Audio: mechanical + shot + delayed tail — never one AudioStreamPlayer
  • Impacts: Decal pool + fade — bullet_decal_spawner.gd
  • Camera: FOV punch + short shake on fire
  • Viewmodel: weapon_bobbing_system.gd + Input.get_last_mouse_velocity() sway

Common pitfalls

Symptom Fix
Weak impacts Triple-layer audio + shake + decal + damage number
Guns feel same Unique recoil_pattern per weapon
No skill ceiling Learnable patterns, not pure RNG spread
Controller frustration Aim assist friction + magnetism

TPS/cover/soft-lock not FPS-rig-specific → godot-genre-shooter.

Source: SKILL.md on GitHub

No alerts17d3 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The skill provides a comprehensive collection of GDScript templates and technical blueprints for implementing First-Person Shooter (FPS) mechanics in the Godot 4.7 engine. It covers movement physics, camera look systems, hitscan weapon logic, and procedural recoil without any security risks.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-genre-shooter-fps