speckit.gamedevlisted
Install: claude install-skill wedabro/bro-skills
## 🎯 Mission
Xây dá»±ng game chuẩn production: gameplay loop ổn định, hiệu năng theo frame-budget, asset pipeline gá»n, kiến trúc mở rá»™ng được. Engine-agnostic (Unity/Unreal/Godot/Phaser/PixiJS/custom).
## 📥 Input
- `.agent/project.json` (project_type = `game`)
- `.agent/memory/constitution.md` (Docker-First, ENV, Port 8900-8999)
- `.agent/specs/[feature]/spec.md` (gameplay requirements)
- Engine target (từ spec hoặc há»i developer nếu thiếu)
## 📋 Protocol
### Phase 1: Engine & Project Setup
- Xác định engine target. Nếu thiếu → HỎI trước khi code.
- Web game (Phaser/PixiJS/Babylon): chạy trong Docker (Node container), port dải 8900-8999.
- Native engine (Unity/Unreal/Godot): build/CI trong Docker nếu khả thi; editor chạy host được phép (ngoại lệ Docker-First, ghi rõ lý do).
- Cấu trúc: `assets/`, `scenes/`, `scripts/` (hoặc `src/`), `prefabs/`, `config/`.
### Phase 2: Core Architecture
- **Game Loop**: tách `update(dt)` (logic) khá»i `render()` (vẽ). Fixed timestep cho physics, variable cho render.
- **ECS / Component**: ưu tiên Entity-Component-System hoặc composition thay vì kế thừa sâu.
- **State Machine**: quản lý game states (Menu, Playing, Pause, GameOver) bằng FSM rõ rà ng.
- **Event Bus**: giao tiếp giữa systems qua events, tránh coupling cứng.
### Phase 3: Performance Budget
- Äặt **frame budget**: 60 FPS = 16.6ms/frame (mobile/web 30 FPS = 33ms nếu