本文へ移動
cccskills
無料GitHub で公開

godot-genre-shooter-fps

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.

インストール方法を見る

含まれるファイル(19)

  • SKILL.md9.8 KB
  • references/fps-weapon-theory.md3.1 KB
  • references/migration-notes.md3.7 KB
  • scripts/advanced_fps_controller.gd2.3 KB
  • scripts/advanced_weapon_controller.gd4.4 KB
  • scripts/aim_assist.gd1.9 KB
  • scripts/bullet_decal_spawner.gd1.7 KB
  • scripts/fps_camera_look.gd1.7 KB
  • scripts/fps_movement_logic.gd2.0 KB
  • scripts/frame_perfect_input.gd1.4 KB
  • scripts/hitscan_weapon_logic.gd1.8 KB
  • scripts/hitscan_weapon_query.gd1.9 KB
  • scripts/player_anim_bridge.gd1.4 KB
  • scripts/procedural_recoil_handler.gd1.6 KB
  • scripts/recoil_system.gd1.7 KB
  • scripts/server_projectile_instance.gd1.7 KB
  • scripts/weapon_bobbing_system.gd1.6 KB
  • scripts/weapon_spread_calc.gd1.4 KB
  • scripts/weapon_state_machine.gd1.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

MANDATORY script reads (start here)

  1. fps_camera_look.gd — raw _input mouse look (yaw/pitch)
  2. fps_movement_logic.gd — accel/friction/air control
  3. hitscan_weapon_query.gd — space-state hitscan
  4. weapon_bobbing_system.gd — viewmodel bob/sway

Also: procedural_recoil_handler.gd, hitscan_weapon_logic.gd, advanced_fps_controller.gd, weapon_state_machine.gd, frame_perfect_input.gd, bullet_decal_spawner.gd, weapon_spread_calc.gd, server_projectile_instance.gd, player_anim_bridge.gd, recoil_system.gd (pattern + bloom), aim_assist.gd (controller friction/magnetism).
advanced_weapon_controller.gd is shared theory — keep FPS feel in the scripts above; genre routing for TPS → sibling skill.

Core Loop

Move/Look → Aim → Fire (hitscan) → Recoil recover → Acquire

NEVER Do (FPS)

Gunplay & registration

  • NEVER hit-detect in _process — use _physics_process + intersect_ray.
  • NEVER apply recoil only to the gun mesh — kick camera + bloom/spread.
  • NEVER trust client damage — server authority + lag compensation.
  • NEVER forget exclude / add_exception for the player RID.
  • NEVER use == on float cooldowns — is_equal_approx.

Input & movement

  • NEVER poll mouse in _physics_process — _input / _unhandled_input for look.
  • NEVER accumulate look on a raw Transform3D — store yaw/pitch floats.
  • NEVER multiply velocity by delta before move_and_slide().
  • NEVER use Transform3D.looking_at for muzzle forward — use -transform.basis.z.

Polish

  • NEVER single AudioStreamPlayer for gunfire — layer mechanical + shot + tail.
  • NEVER leave decals forever — fade/pool (bullet_decal_spawner.gd).
  • NEVER hardcode weapon stats — WeaponData Resources.
  • NEVER use plain Strings for hot weapon states — StringName.

Advanced FPS (keep)

Viewmodel sway / bob

Procedural sine bob + look sway — weapon_bobbing_system.gd.

Step-up

Ray forward/down from step_height when is_on_wall() after move_and_slide(); lift to step top for stairs.

Tactical lean

Roll camera Z + local X offset from Input.get_axis("lean_left","lean_right") with lerp.

Shared weapon theory

Hitscan vs projectile, spray patterns, and net prediction details that are not FPS-rig specific → godot-genre-shooter + combat/multiplayer complements. Implement FPS fire path via hitscan_weapon_query.gd + procedural_recoil_handler.gd + recoil_system.gd.

MANDATORY for hitscan/projectile tradeoffs, three-layer recoil, aim assist, weapon balance matrices, and client prediction: fps-weapon-theory.md. Do NOT Load after MANDATORY script reads unless extending beyond bob/step/lean.

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.

Official Documentation

  • Ray-casting — PhysicsDirectSpaceState3D intersect_ray patterns for hitscan registration without Area3D ballistics.
  • Physics introduction — collision layers/masks, layers for player exclude, and physics tick vs visual frame for gunplay.
  • Using 3D transforms — basis axes and -transform.basis.z forward vectors for aim, recoil, and muzzle direction.
  • Using InputEvent — _input vs _physics_process so mouse look stays zero-latency while movement stays physics-synced.
  • Mouse and input coordinates — relative mouse motion, capture, and screen-center projection for aim rays.
  • Controllers, gamepads, and joysticks — analog look axes and deadzones that aim-assist friction/magnetism build on.
  • Using decals — Decal node projection for bullet impacts instead of Sprite3D/QuadMesh stickers.
  • High-level multiplayer — RPC authority and fire-event patterns for server-validated hitscan without syncing every bullet.
  • Using AnimationTree — blend/state machines for idle/aim/fire/reload without ! in expressions.
  • Resources — WeaponData Resource stats (damage, recoil, spread) instead of hardcoded class constants.
  • Audio streams — layered mechanical/shot/tail streams for gunfire weight.
  • Optimization using Servers — RenderingServer RID paths for high-volume visual projectiles without SceneTree spam.

Related Skills

Prerequisites

  • godot-project-foundations — scene tree, InputMap actions, and Resource import basics before FPS controllers and WeaponData wiring.
  • godot-input-handling — mouse capture, action buffering, and look vs move split that frame-perfect fire and camera look depend on.
  • godot-raycasting-queries — physics-synced ray/shape queries and exclude RIDs that hitscan registration builds on.

Complements

Downstream / consumers

  • godot-monte-carlo-balancer — simulate weapon asymmetry matrices, TTK bands, and bloom/recoil knobs before shipping balance tables.
  • godot-genre-battle-royale — large-scale relevancy and lag-compensated combat that reuses FPS hitscan/recoil feel inside BR matches.

Master

  • godot-master — library router and mirrored module entry; open when discovering which Domain Skill owns a cross-cutting FPS concern.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Bevy ECS skill for 2D sprite animation. Keywords: Bevy, sprite, animation, AnimationPlayer, AnimationClip, 2D.

日本語の概要は準備中です。原文の説明を表示しています。

thedivergentai/Game-Design-Agentic-Skills8452026年10月13日 更新

Bevy ECS skill for 3D lights. Keywords: Bevy, lighting, directional, point, spot, bevy_light, PBR.

日本語の概要は準備中です。原文の説明を表示しています。

thedivergentai/Game-Design-Agentic-Skills8452026年10月13日 更新

Bevy ECS skill for PBR materials. Keywords: Bevy, StandardMaterial, PBR, material, ExtendedMaterial.

日本語の概要は準備中です。原文の説明を表示しています。

thedivergentai/Game-Design-Agentic-Skills8452026年10月13日 更新

Bevy ECS skill for 3D level assembly. Keywords: Bevy, level, scene, mesh, world, ECS.

日本語の概要は準備中です。原文の説明を表示しています。

thedivergentai/Game-Design-Agentic-Skills8452026年10月13日 更新

Bevy ECS skill for abilities. Keywords: Bevy, ability, cooldown, ECS, gameplay.

日本語の概要は準備中です。原文の説明を表示しています。

thedivergentai/Game-Design-Agentic-Skills8452026年10月13日 更新

Bevy ECS skill for moving a Bevy game from 2D to 3D. Keywords: Bevy, 2D, 3D, adapt, camera, sprite.

日本語の概要は準備中です。原文の説明を表示しています。

thedivergentai/Game-Design-Agentic-Skills8452026年10月13日 更新

thedivergentai のスキルをすべて見る

このスキルの問題を報告する