engine-selection – skill Thiết kế & UI cho agent AI
Chọn game engine và framework theo nền tảng, thể loại và kiến trúc (canvas toàn màn hình hoặc DOM shell kết hợp guest viewport). Bao gồm Phaser, PixiJS, Kaplay, Canvas/WebGL, Three.js, Babylon.js, Godot, Unity, Ink, Twine. Dùng khi chọn stack hoặc so sánh runtime trước khi triển khai.
Cài skill engine-selection bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/engine-selection-a6712.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /engine-selection – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/engine-selection-a6712.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $engine-selection – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/engine-selection-a6712.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /engine-selection – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/engine-selection-a6712.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /engine-selection – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Engine selection
> Pick tools that match delivery target, interaction model, and team constraints. Engines serve the game type — not the reverse.
---
Fit questions (ask first)
1. Platform: Web, mobile, PC, console, VR?
2. Primary loop: Action/physics, turn-based, narrative branch, management/UI, hybrid?
3. Presentation: Full-screen canvas, DOM/UI chrome, or both?
4. Toolchain: No-build / ESM OK, or bundler + editor OK?
5. Authoring: Code-only, or designers need Twine/Ink/Godot/Unity editors?
---
Architecture patterns
| Pattern | When | Notes |
|---------|------|-------|
| Full engine shell | Game *is* the canvas/scene | Phaser, Godot, Unity, Kaplay as app root |
| Renderer + custom logic | You want draw power, own gameplay | PixiJS, Three.js + your systems |
| Hybrid shell + guest | Dense UI/text + occasional skill-checks | DOM/app shell; mount canvas engines in modals/viewports only |
| Narrative runtime | Branching prose is the product | Ink, Twine; host chrome separately |
| Content-as-data | Levels/events authored as packs | JSON/YAML + thin loader; engine optional |
---
Version names are examples. Verify current official stable releases, target exports, plugin compatibility and license terms before pinning a stack; prototype the critical mechanic and delivery size rather than treating subjective fit labels as benchmarks. Phaser installation reference: https://docs.phaser.io/phaser/getting-started/installation .
Web — decision tree
What type of game?
│
├── Mostly DOM / panels / forms / text UI
│ ├── + small arcade/spatial challenges
│ │ └── Hybrid: custom shell + guest
│ │ Raw Canvas/WebGL → Kaplay → Phaser → PixiJS
│ └── + branching story
│ └── Ink (inkjs) or Twine export → host in DOM
│
├── Full-screen 2D game
│ ├── Full gameplay features (scenes, physics, input)
│ │ └── Phaser 4 (or Kaplay if you want lighter/faster prototype)
│ └── Mostly rendering / custom systems
│ └── PixiJS 8 (or Raw Canvas/WebGL if tiny scope)
│
└── Full-screen 3D game
├── Full engine / physics / XR
│ └── Babylon.js
└── Rendering-focused / lighter
└── Three.js---
Quick comparison (web & common exports)
| Tool | Type | Best for | Watch-outs |
|------|------|----------|------------|
| Raw Canvas / WebGL | 2D/low-level | Tiny games, learning, no framework tax | You own everything |
| Kaplay (ex-Kaboom) | 2D toolkit | Fast prototypes, jam games | Less “full product” structure than Phaser |
| Phaser 4 | 2D engine | Complete 2D features | Heavier; often bundled |
| PixiJS 8 | 2D renderer | Performance, custom game code | Not a full gameplay framework alone |
| Three.js | 3D renderer | Visuals, lightweight 3D | You add gameplay systems |
| Babylon.js | 3D engine | Fuller 3D + XR | Heavier than Three for simple scenes |
| Ink + inkjs | Narrative | Complex branching prose | Weak for real-time multi-entity sims |
| Twine / Twison / TweeJS | Narrative | Educator-friendly branches | Export/host glue; not a physics engine |
| Godot 4 | Full engine | 2D/3D indie, open source | Web export iteration cost |
| Unity | Full engine | Large teams, multi-platform | Heavy for simple web UI games |
Editor-first web shells (Construct, GDevelop) fit visual prototyping; weaker when you need versioned code-first content pipelines.
---
Non-web defaults (see also platform skills)
| Target | Lean toward |
|--------|-------------|
| PC indie / open source | Godot 4 |
| PC large team / multi-platform | Unity |
| Mobile | See game-development/mobile-games (touch, stores, battery) |
| VR/AR | See game-development/vr-ar (+ Babylon/Three on web) |
---
Anti-patterns
| Don't | Do |
|-------|-----|
| Choose Unity/Godot for a form-heavy browser tool | Prefer DOM/hybrid |
| Force Ink to run real-time concurrent simulations | Use narrative tools for branches; custom/sim code for clocks & entities |
| Use Phaser as “the whole app” when the surrounding UI is HTML | Prefer a hybrid guest viewport |
| Optimize for WebGPU on day one | Ship WebGL; add WebGPU + fallback when needed |
When to Use
Use when choosing or comparing game engines/frameworks before implementation, especially for hybrid DOM+canvas or narrative-first products.
Limitations
- Does not replace platform skills (
game-development/web-games,game-development/pc-games, …). - Final choice still depends on team skill and shipping constraints.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Skill liên quan
- quality-manager-qms-iso13485 – Triển khai và duy trì hệ thống quản lý chất lượng ISO 13485 cho tổ chức thiết bị y tế…
- enhance-prompt – Biến ý tưởng UI còn mơ hồ thành prompt hoàn chỉnh, tối ưu cho Stitch. Tăng độ cụ thể…
- rag-architect – Dùng khi người dùng yêu cầu thiết kế pipeline RAG, chọn chiến lược chunking hoặc…
- event-sourcing-architect – Chuyên gia về event sourcing, CQRS và kiến trúc hướng sự kiện. Thành thạo thiết kế event…
- event-store-design – Thiết kế và triển khai event store cho hệ thống event-sourced. Dùng khi xây dựng hạ tầng…
- vision-sft – Tinh chỉnh các mô hình ngôn ngữ-thị giác (VLM) bằng học có giám sát trên dữ liệu ảnh+văn…
- expo-animation – Hướng dẫn tuyển chọn từ upstream cho Expo Animation; dùng khi quy trình khớp với mục…
- visual-design-foundations – Áp dụng nguyên tắc typography, lý thuyết màu sắc, hệ thống khoảng cách và iconography để…