entity-component-system
/entity-component-system
Model game objects as entities with data components processed by systems, and know when ECS complexity pays. Use when structuring game architecture or escaping deep inheritance hierarchies.
- Author
- Amey-Thakur ↗
- Repository
- AI-SKILLS ↗
- Licence
- MIT
- Last repository change
- 05.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Model game objects as entities with data components processed by systems, and know when ECS complexity pays. Use when structuring game architecture or escaping deep inheritance hierarchies.
Original author description
Model game objects as entities with data components processed by systems, and know when ECS complexity pays. Use when structuring game architecture or escaping deep inheritance hierarchies.
How it works
- Method
- Boundaries
SKILL.md preview
---
name: entity-component-system
description: Model game objects as entities with data components processed by systems, and know when ECS complexity pays. Use when structuring game architecture or escaping deep inheritance hierarchies.
---
# Entity component system
ECS replaces "what an object *is*" (inheritance) with "what an object
*has*" (components) and "what processes it" (systems). You buy
composition flexibility and cache-friendly iteration; you pay in
indirection for gameplay logic that wants to reason about one thing.
## Method
1. **Adopt for the two real reasons.** (a) Composition pressure:
the FlyingPoisonousArmoredEnemy inheritance diamond, where
designers want to mix abilities freely. (b) Performance at
scale: thousands of entities iterated per frame, where
struct-of-arrays layout wins cache behavior (see
systems-profiling's data-layout lesson). A dozen bespoke
objects need neither; plain objects or simple composition
serve better (see premature-abstraction).
2. **Keep components as pure data.** `Position{x,y}`,
`Velocity{dx,dy}`, `Health{hp,max}`: no methods beyond
accessors, no references to other entities' components (store
entity IDs instead; see rust-ownership's handle pattern).
Behavior lives in systems; a component with logic is a class
wearing a costume.
3. **Write systems as queries over component sets.** Movement
iterates `(Position, Velocity)`; damage iterates
`(Health, IncomingDamage)`: each system declares what it
reads and writes, runs over every matching entity, and stays
ignorant of entity "types". Small, single-purpose systems
compose the game; a MegaSystem touching everything recreates
the God object horizontally.
4. **Order systems explicitly; defer structural changes.**
A documented execution order (input, AI, physics, damage,
cleanup, render-sync) inside the fixed update (see
game-loop-architecture); entity creation/deletion and
component add/remove during iteration go through a command
buffer applied at a sync point, because mutating storage
mid-query invalidates iteration everywhere.
5. **Use tags and events idiomatically.** Empty components as
tags (`Dead`, `PlayerControlled`) make queries expressive;
short-lived event components (or a queue consumed by one
system) carry "this happened" between systems without
callbacks. Singleton/resource storage holds world state
(time, input snapshot) systems share.
6. **Reach for an existing ECS library.** Archetype or
sparse-set storage, query caching, and change detection are
solved problems (flecs/entt/bevy-class); hand-rolling them
is a project in itself. Your architecture work is component
vocabulary and system ordering, not storage engineering
(see managed-vs-selfhosted instincts, in miniature).
## Boundaries
- UI, audio management, and meta-game code (menus, saves) gain
nothing from ECS; use ordinary structures there and bridge at
the edges (see game-save-systems).
- ECS complicates entity-centric logic ("what is *this* boss
doing"): scripts and state machines can attach as components
driving data, but debugging crosses more indirection: budget
for tooling (entity inspectors).
- Engines with their own object models (Unity GameObjects,
Unreal Actors) offer partial ECS layers; mixing paradigms in
one project needs a clear rule for what lives where.
Versions
The database has no other skills named entity-component-system.
Database snapshot: 13.11.2026 · package version fdc046220a1e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100ecs-system-and-component-design
ECS system and component design using Arch ECS. Use when creating or modifying systems, components, queries, cleanup, singletons, or tests -- also for code reviewing World/Entity/component usage. - 100ecs-architecture
Use this skill when the user says 'ecs', 'entity component system', 'archetype', 'sparse set', 'system scheduling', 'data-oriented design'. Compares and designs ECS storage models (archetype vs sparse set), queries, system scheduling and when ECS is the right choice. Do NOT use… - 100bevy-game-engine
Bevy game engine: ECS, rendering, input, and asset management. Use when building Bevy games, working with entities/components/systems, or mentioning Rust gamedev or 2D/3D games. - 100gecs
gecs ECS framework API reference — the Entity-Component-System addon for Godot 4.x used by this project. Covers Entity, Component, System, World, QueryBuilder, Relationship, Observer, CommandBuffer, SystemTimer. Use when the task involves ECS architecture: creating entities with… - 100ecs-guide
Use when designing or implementing a data-oriented Entity-Component-System: archetype/bitmask storage, contiguous per-type component arrays, filter-and-batch systems, change tracking, and syncing ECS state into stateful external systems (renderer, physics). Triggers on entities,… - 85jecs
Use when building ECS-based games in Roblox with roblox-ts using jecs for entities, components, queries, and relationships