Loading...
Loading...
Build a first-person shooter: move+mouse-look controller, hitscan or projectile shooting, weapons, health, and enemy AI. Use for an FPS, or tuning aim feel, time-to-kill, recoil, or spread.
npx skill4agent add gamedev-skills/awesome-gamedev-agent-skills fps-shootertower-defensegodot-3d-essentialsunreal-cpp-gameplaygame-ai| Knob | Effect | Sane default |
|---|---|---|
| Time-to-kill (TTK) | lethality, forgiveness | Tune dmg × fire-rate × HP together (refs). |
| Hitscan vs projectile | aim skill type | Hitscan = flick; projectile = lead/dodge. |
| Damage falloff | range limiting | Full to ~20 m, floor by ~60 m. |
| Headshot multiplier | skill reward | ~1.5–2.0×. |
| Recoil pattern | learnable kick | Fixed pattern > pure random. |
| Spread (bloom) | suppress laser-accuracy | First shot accurate; grows while firing. |
| Fire rate / magazine / reload | rhythm, downtime | Reload = vulnerability window. |
| Mouse sensitivity / FOV | comfort, readability | Always expose both as options. |
| Aim assist (pad) | controller parity | Magnetism/slowdown near targets. |
# Pseudocode. Cast from the camera; first hit takes damage scaled by range + headshot.
direction = apply_spread(camera.forward, current_spread)
hit = raycast(camera.world_position, direction, max_dist=RANGE, mask=SHOOTABLE)
if hit:
dmg = base_damage * falloff(hit.distance)
if hit.is_head: dmg *= HEADSHOT_MULT
hit.actor.take_damage(dmg)
spawn_impact_fx(hit.point, hit.normal) # decal + sound + hitmarker# Pseudocode. Spawn a moving body; it deals damage on its own collision.
p = spawn(projectile_scene, at=muzzle.world_position)
p.velocity = camera.forward * PROJECTILE_SPEED
p.on_hit = lambda other, point: (other.take_damage(base_damage), explode_fx(point))
p.lifetime = RANGE / PROJECTILE_SPEED # despawn so shots don't live forever# Pseudocode. TTK falls out of HP, per-shot damage, and fire rate — tune as one system.
shots_to_kill = ceil(target_hp / damage_per_shot)
ttk_seconds = (shots_to_kill - 1) / fire_rate_per_second # first shot at t=0dtdtphysics-tuninggodot-3d-essentialsunreal-cpp-gameplayunreal-blueprintsunity-physicsinput-systemsunreal-enhanced-inputgodot-physicsunity-physicsgame-aiunity-navmeshunreal-behavior-treescamera-systemsgame-feelaudio-designshader-programmingprototype-fastreferences/shooting-and-feel.md