When to activate
- Designing architecture for a new game project
- Choosing between OOP, ECS, or hybrid patterns
- Planning game state management and scene transitions
- Designing component/entity systems for scalability
- Structuring game logic for modding support
When NOT to use
- For non-game application architecture
- For game art pipeline or audio design
- For engine-specific implementation details
Instructions
- Choose architecture pattern. OOP (Unity MonoBehaviour), ECS (Unity DOTS, custom), or hybrid. Consider team size and complexity.
- Define game loop. Fixed update (physics) vs variable update (rendering) vs late update (camera follow). Input handling priority.
- State management. Finite State Machine (FSM) for simple, Hierarchical FSM for complex, Behavior Trees for AI.
- Entity system. Entities (ID), Components (data), Systems (logic). Data-driven design. Prefab/factory pattern for instantiation.
- Event system. Observer pattern for loose coupling. Event bus for global events. Direct references for hot paths.
- Scene management. Scene loading/unloading, object pooling, persistent managers (audio, save, UI).
- Modding hooks. Expose data files (JSON/Lua), event hooks, asset override system.
Example
Game Architecture: 2D Platformer
Pattern: Hybrid (OOP for gameplay, ECS for particle/bullet systems)
Game Loop:
FixedUpdate (50Hz): Physics, collision, movement
Update (variable): Input, animation, UI
LateUpdate: Camera follow
State Machine:
Player: Idle → Running → Jumping → Falling → Landing
Game: Loading → Playing → Paused → GameOver
Systems:
InputSystem → MovementSystem → CollisionSystem → DamageSystem → UISystem
1---2name: game-architecture3description: Design game architecture — ECS patterns, state machines, entity systems, and component composition4allowed-tools: [Read, Write, Grep]5effort: high6metadata:7 source: https://skillmd.com/skills/uitbreidenos/game-architecture8---910## When to activate1112- Designing architecture for a new game project13- Choosing between OOP, ECS, or hybrid patterns14- Planning game state management and scene transitions15- Designing component/entity systems for scalability16- Structuring game logic for modding support1718## When NOT to use1920- For non-game application architecture21- For game art pipeline or audio design22- For engine-specific implementation details2324## Instructions25261. **Choose architecture pattern.** OOP (Unity MonoBehaviour), ECS (Unity DOTS, custom), or hybrid. Consider team size and complexity.272. **Define game loop.** Fixed update (physics) vs variable update (rendering) vs late update (camera follow). Input handling priority.283. **State management.** Finite State Machine (FSM) for simple, Hierarchical FSM for complex, Behavior Trees for AI.294. **Entity system.** Entities (ID), Components (data), Systems (logic). Data-driven design. Prefab/factory pattern for instantiation.305. **Event system.** Observer pattern for loose coupling. Event bus for global events. Direct references for hot paths.316. **Scene management.** Scene loading/unloading, object pooling, persistent managers (audio, save, UI).327. **Modding hooks.** Expose data files (JSON/Lua), event hooks, asset override system.3334## Example3536```37Game Architecture: 2D Platformer3839Pattern: Hybrid (OOP for gameplay, ECS for particle/bullet systems)40Game Loop:41 FixedUpdate (50Hz): Physics, collision, movement42 Update (variable): Input, animation, UI43 LateUpdate: Camera follow4445State Machine:46 Player: Idle → Running → Jumping → Falling → Landing47 Game: Loading → Playing → Paused → GameOver4849Systems:50 InputSystem → MovementSystem → CollisionSystem → DamageSystem → UISystem51```