Game Architect Skill
Game architecture domain knowledge reference. Provides paradigm selection, system design references for game project architecture.
[!NOTE]
This skill contains domain knowledge only, not a workflow. Pair it with a workflow skill (e.g., OpenSpec, SpecKit) or an agent's plan mode for structured design flow.
Usage Modes
With Workflow Skill (Recommended)
When used with a workflow skill (e.g., OpenSpec, SpecKit) or in the plan mode of an agent, this skill serves as a domain knowledge plugin:
- - During requirements/spec phases: Consult the Paradigm Selection Guide and System-Specific References to inform architectural decisions
- During design/planning phases: Use the Reference Lookup Guide below to read relevant
references/ documents
Standalone
A lightweight workflow-standalone.md is also available as a self-contained design pipeline if needed.
Knowledge Mode (Query)
When user requests to query knowledge for game architecture, this skill provides a reference lookup guide to relevant references/ documents based on the task.
Reference Lookup Guide
When designing game architecture, read the relevant references/ documents based on the task:
Architecture References
| When | Read |
|---|
| Always (high-level structure) | INLINECODE4 |
| Always (core principles) |
references/principles.md |
| Requirement analysis |
references/requirements.md |
| Choosing DDD paradigm |
references/domain-driven-design.md |
| Choosing Data-Driven paradigm |
references/data-driven-design.md |
| Choosing Prototype paradigm |
references/prototype-design.md |
| Evolution & extensibility review |
references/evolution.md |
| Performance optimization needed |
references/performance-optimization.md |
| Multiplayer support needed |
references/system-multiplayer.md |
For system-specific design, see the System-Specific References table below.
System-Specific References
| System Category | Reference |
|---|
| Foundation & Core (Logs, Timers, Modules, Events, Resources, Audio, Input) | INLINECODE13 |
| Time & Logic Flow (Update Loops, Async, FSM, Command Queues, Controllers) |
references/system-time.md |
| Combat & Scene (Scene Graphs, Spatial Partitioning, ECS/EC, Loading) |
references/system-scene.md |
| UI & Modules (Modules Management, MVC/MVP/MVVM, UI Management, Data Binding, Reactive) |
references/system-ui.md |
| Skill System (Attribute, Skill, Buff) |
references/system-skill.md |
| Action Combat System (HitBox, Damage, Melee, Projectiles) |
references/system-action-combat.md |
| Narrative System (Dialogue, Cutscenes, Story Flow) |
references/system-narrative.md |
| Game AI System (Movement, Pathfinding, Decision Making, Tactical) |
references/system-game-ai.md |
| Multiplayer System (Client-Server, Sync Models, Distributed Server, AOI, Communication) |
references/system-multiplayer.md |
| Algorithm & Data Structures (Pathfinding, Search, Physics, Generic Solver) |
references/algorithm.md |
Paradigm Selection Guide
| Paradigm | KeyPoint | Applicability Scope | Examples | Reference |
|---|
| Domain-Driven Design (DDD) | OOP & Entity First | High Rule Complexity. <br> Rich Domain Concepts. <br> Many Distinct Entities. | Core Combat Logic, Physics Interactions, Damage/Buff Rules, Complex AI Decision. | INLINECODE23 |
| Data-Driven Design |
Data Layer First | High Content Complexity.
Flow Orchestration.
Simple Data Management. |
Content: Quests, Level Design.
Flow: Tutorial Flow, Skill Execution, Narrative.
Mgmt: Inventory, Shop, Mail, Leaderboard. |
references/data-driven-design.md |
|
Use-Case Driven Prototype | Use-Case Implementation First | Rapid Validation | Game Jam, Core Mechanic Testing. |
references/prototype-design.md |
Mixing Paradigms
Most projects mix paradigms:
- 1. Macro Consistency: All modules follow the same Module Management Framework.
- Domain for Core Entities & Rules: Use DDD for systems with high rule complexity, rich domain concepts, and many distinct entities (e.g., Combat Actors, Damage Formulas, AI Decision).
- Data for Content, Flow & State: Use Data-Driven for expandable content (Quests, Level Design), flow orchestration (Tutorial, Skill Execution, Narrative), and simple data management (Inventory, Shop).
- Hybrid Paradigms:
- 4.1
Entities as Data: Domain Entities naturally hold both data (fields) and behavior (methods). Design entities to be serialization-friendly (use IDs, keep state as plain fields) so they serve both roles without a separate data layer.
- 4.2
Flow + Domain: Use data-driven flow to orchestrate the sequence/pipeline, domain logic to handle rules at each step. E.g., Skill System: flow drives cast→channel→apply, domain handles damage calc and buff interactions.
- 4.3
Separate Data/Domain Layers: Only when edit-time and runtime representations truly diverge. Use a Bake/Compile step to bridge them. E.g., visual node-graph editors, compiled assets.
- 5. Paradigm Interchangeability: Many systems can be validly implemented with either paradigm. E.g., Actor inheritance hierarchy (Domain) ↔ ECS components + systems (Data-Driven); Buff objects with encapsulated rules (Domain) ↔ Tag + Effect data entries resolved by a generic pipeline (Data-Driven). See Selection Criteria table above for trade-off signals.
- Integration: Application Layer bridges different paradigms.
Selection Criteria
When both DDD and Data-Driven fit, use these signals:
| Signal | Favor DDD | Favor Data-Driven |
|---|
| Entity interactions | Complex multi-entity rules (attacker × defender × buffs × environment) | Mostly CRUD + display, few cross-entity rules |
| Behavior source |
Varies by entity type, hard to express as pure data | Driven by config tables, designer-authored content |
| Change frequency | Rules change with game balance iterations | Content/flow changes far more often than logic |
| Performance profile | Acceptable overhead for rich object graphs | Needs batch processing, cache-friendly layouts |
| Networking | Stateful objects acceptable | Flat state snapshots preferred (sync, rollback) |
| Team workflow | Programmers own the logic | Designers need to iterate without code changes |
游戏架构技能
游戏架构领域知识参考。为游戏项目架构提供范式选择、系统设计参考。
[!NOTE]
本技能仅包含领域知识,不包含工作流程。请搭配工作流技能(如OpenSpec、SpecKit)或智能体的计划模式使用,以完成结构化设计流程。
使用模式
搭配工作流技能(推荐)
与工作流技能(如OpenSpec、SpecKit)或智能体的计划模式配合使用时,本技能作为领域知识插件:
- - 需求/规格阶段:参考范式选择指南和系统专项参考,为架构决策提供依据
- 设计/规划阶段:使用下方参考查找指南,阅读相关references/文档
独立使用
如需独立使用,也可使用轻量级workflow-standalone.md作为自包含设计流程。
知识查询模式
当用户请求查询游戏架构相关知识时,本技能根据任务提供相关references/文档的参考查找指南。
参考查找指南
设计游戏架构时,根据任务阅读相应的references/文档:
架构参考
| 场景 | 阅读文档 |
|---|
| 始终(高层结构) | references/macro-design.md |
| 始终(核心原则) |
references/principles.md |
| 需求分析 | references/requirements.md |
| 选择DDD范式 | references/domain-driven-design.md |
| 选择数据驱动范式 | references/data-driven-design.md |
| 选择原型范式 | references/prototype-design.md |
| 演进与扩展性审查 | references/evolution.md |
| 需要性能优化 | references/performance-optimization.md |
| 需要多人支持 | references/system-multiplayer.md |
系统专项设计请参见下方系统专项参考表。
系统专项参考
| 系统类别 | 参考文档 |
|---|
| 基础与核心(日志、定时器、模块、事件、资源、音频、输入) | references/system-foundation.md |
| 时间与逻辑流(更新循环、异步、有限状态机、命令队列、控制器) |
references/system-time.md |
| 战斗与场景(场景图、空间分区、ECS/EC、加载) | references/system-scene.md |
| UI与模块(模块管理、MVC/MVP/MVVM、UI管理、数据绑定、响应式) | references/system-ui.md |
| 技能系统(属性、技能、Buff) | references/system-skill.md |
| 动作战斗系统(判定框、伤害、近战、投射物) | references/system-action-combat.md |
| 叙事系统(对话、过场动画、故事流程) | references/system-narrative.md |
| 游戏AI系统(移动、寻路、决策、战术) | references/system-game-ai.md |
| 多人系统(客户端-服务器、同步模型、分布式服务器、AOI、通信) | references/system-multiplayer.md |
| 算法与数据结构(寻路、搜索、物理、通用求解器) | references/algorithm.md |
范式选择指南
| 范式 | 关键点 | 适用范围 | 示例 | 参考文档 |
|---|
| 领域驱动设计(DDD) | OOP与实体优先 | 规则复杂度高。<br>领域概念丰富。<br>实体种类繁多。 | 核心战斗逻辑、物理交互、伤害/Buff规则、复杂AI决策。 | references/domain-driven-design.md |
| 数据驱动设计 |
数据层优先 | 内容复杂度高。
流程编排。
简单数据管理。 |
内容:任务、关卡设计。
流程:教程流程、技能执行、叙事。
管理:背包、商店、邮件、排行榜。 | references/data-driven-design.md |
|
用例驱动原型 | 用例实现优先 | 快速验证 | 游戏开发大赛、核心机制测试。 | references/prototype-design.md |
范式混合使用
大多数项目会混合使用多种范式:
- 1. 宏观一致性:所有模块遵循相同的模块管理框架。
- 核心实体与规则使用领域驱动:对规则复杂度高、领域概念丰富、实体种类繁多的系统使用DDD(如战斗角色、伤害公式、AI决策)。
- 内容、流程与状态使用数据驱动:对可扩展内容(任务、关卡设计)、流程编排(教程、技能执行、叙事)和简单数据管理(背包、商店)使用数据驱动。
- 混合范式:
- 4.1
实体即数据:领域实体天然同时持有数据(字段)和行为(方法)。设计实体时使其易于序列化(使用ID、将状态保持为纯字段),从而无需单独的数据层即可承担双重角色。
- 4.2
流程+领域:使用数据驱动流程编排序列/管道,使用领域逻辑处理每个步骤的规则。例如技能系统:流程驱动施法→引导→应用,领域处理伤害计算和Buff交互。
- 4.3
分离数据/领域层:仅在编辑时和运行时表示真正存在差异时使用。通过烘焙/编译步骤进行桥接。例如可视化节点图编辑器、编译后的资源。
- 4.4
范式可互换性:许多系统可以用任一范式有效实现。例如角色继承层次结构(领域)↔ ECS组件+系统(数据驱动);带封装规则的Buff对象(领域)↔ 由通用管道解析的标签+效果数据条目(数据驱动)。权衡信号参见上方
选择标准表。
- 5. 集成:应用层桥接不同范式。
选择标准
当DDD和数据驱动都适用时,参考以下信号:
| 信号 | 倾向DDD | 倾向数据驱动 |
|---|
| 实体交互 | 复杂的多实体规则(攻击者×防御者×Buff×环境) | 主要是CRUD+展示,跨实体规则少 |
| 行为来源 |
因实体类型而异,难以用纯数据表达 | 由配置表驱动,设计师创作的内容 |
| 变更频率 | 规则随游戏平衡迭代而变化 | 内容/流程变更频率远高于逻辑 |
| 性能特征 | 丰富的对象图开销可接受 | 需要批处理、缓存友好的布局 |
| 网络 | 有状态对象可接受 | 偏好扁平状态快照(同步、回滚) |
| 团队工作流 | 程序员负责逻辑 | 设计师需要无需改代码即可迭代 |