fps-shooter
Skill này làm gì
Skill này hướng dẫn xây dựng game bắn súng góc nhìn thứ nhất, từ di chuyển và nhìn bằng chuột đến bắn và cảm giác chiến đấu. Nó dành cho nhà phát triển muốn ngắm bắn sắc nét và các cú trúng đòn thỏa mãn.
Khi nào nên dùng
- ✓Khi bạn đang xây dựng game bắn súng góc nhìn thứ nhất, trong đó ngắm và bắn là hành động chính.
- ✓Khi bạn cần chọn giữa vũ khí bắn tức thời và vũ khí bắn đạn bay.
- ✓Khi súng không có cảm giác đúng và bạn cần chỉnh độ tán loạn, độ giật hoặc thời gian hạ gục.
Liên kết skill
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/genres/fps-shooter/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi đang làm một game bắn súng góc nhìn thứ nhất. Bạn có thể thiết lập việc nhìn bằng chuột, một khẩu súng trường bắn tức thời và một kẻ thù đơn giản cần vài phát mới hạ gục không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent xây dựng bộ điều khiển góc nhìn thứ nhất với di chuyển và nhìn bằng chuột, thêm mô hình bắn bằng tia tức thời hoặc đạn bay, và thiết lập máu cùng hành vi kẻ thù. Sau đó nó chỉnh cảm giác bằng thời gian hạ gục, độ giật và độ tán loạn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
FPS Shooter
A playbook for first-person shooters — the look/move controller, the shooting model, weapon feel, and combat. This is a compositional skill: it wires a 3D controller, input, and AI into a shooter. It does not re-teach 3D nodes or raycasts; it defines the shooting model and the feel knobs (TTK, recoil, spread) that decide whether the guns feel good.
When to use
- Use when building a first-person game whose core verb is aim and shoot — arena shooter, tactical FPS, PvE shooter, boomer-shooter.
- Use when deciding hitscan vs. projectile, tuning time-to-kill, recoil, spread, or aim feel.
When not to use: third-person/2D shooting → reuse the shooting model here but build the
camera/controller from the relevant genre. Wave survival with towers → tower-defense.
For the camera/character body itself, use godot-3d-essentials / unreal-cpp-gameplay.
Core loop
Scan → acquire a target → aim and fire → confirm the kill (feedback) → reposition / reload / advance. The whole experience rests on the aim-and-fire micro-loop feeling crisp: responsive look, clear hit feedback, and a death that reads instantly.
Must-have systems
- First-person controller — move (WASD/stick) + mouse/stick look, gravity, jump/crouch.
- Camera — eye-height view, configurable FOV and sensitivity, recoil kick.
- Shooting model — hitscan raycast and/or projectile spawn; one impact path for feedback.
- Weapons + ammo — damage, fire rate, magazine, reload, switching.
- Health + damage — HP, hit/headshot multipliers, death; player and enemy share the model.
- Enemy AI — perceive → alert → attack → search; cover and reaction delays (
game-ai). - Feedback — hitmarkers, impact decals/particles, hit sounds, screen shake, kill confirms.
- Objectives — what you do besides shoot: clear, capture, survive, escort.
Design knobs
| 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. |
Patterns
1. Hitscan shot (instant ray, the workhorse)
# Pseudocode. Cast from the camera; first hit takes damage scaled by range + headshot.
direction = apply_spread(camera.forward, current_spread) # cone sample, see refs §4
hit = raycast(camera.world_position, direction, max_dist=RANGE, mask=SHOOTABLE, exclude=[shooter])
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
2. Projectile shot (dodgeable, leads the target)
# 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
3. Time-to-kill (balance the trio together)
# 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=0
Pitfalls / failure modes
- Look tied to frame rate or unscaled by
dt→ sensitivity changes with FPS. Look should be driven by raw mouse delta (never multiplied bydt); movement integration usesdt(seephysics-tuning). Clamp pitch to about ±89° so the view cannot flip over. - Shots that "do nothing" → the ray hits the shooter's own collider, misses hitboxes built from trigger/area volumes, or stops on an invisible trigger zone. Exclude the shooter and set the trigger rule explicitly per engine (refs §2 table).
- **Recoil recovery fights t
Câu hỏi thường gặp
Bắn tức thời là gì?
Đó là loại bắn kiểm tra trúng đích ngay lập tức dọc theo một đường thẳng, thay vì bay một viên đạn.
Thời gian hạ gục là gì?
Đó là thời gian cần để hạ gục một kẻ thù, và skill dùng nó để chỉnh cảm giác chiến đấu.
Skill có bao quát game bắn súng góc nhìn thứ ba không?
Mô hình bắn có thể dùng lại, nhưng camera và bộ điều khiển phải lấy từ một skill góc nhìn thứ ba.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 6.6k
- Vị trí xếp hạng
- #13808
- Giấy phép
- Apache-2.0
- Cập nhật
- 28/10/2026
Bình luận
- …
Thêm skill từ kho mã này
router
6.6kGiúp agent của bạn chọn đúng skill phát triển game cho yêu cầu, dựa trên engine bạn dùng và loại công việc cần làm.
ai-behavior-trees-utility-ai
6.6kGiúp agent của bạn xây dựng behavior tree và hệ thống utility AI cho kẻ thù và nhân vật trong game, chọn hành động theo độ ưu tiên và điểm số.
audio-design
6.6kDạy agent cách trộn âm thanh game: bus, âm lượng theo decibel, hạ nhạc khi có thoại, nhạc thích ứng và biến thể hiệu ứng âm thanh.
camera-systems
6.6kGiúp agent của bạn xây dựng camera game bám theo mượt, giữ trong phạm vi màn chơi, và xoay quanh hoặc nhìn quanh trong 3D.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.