gecs-entities-components
Installation
SKILL.md
GECS Entities & Components in Godot 4.3+
Design decoupled data containers and spatial scene bridges using GECS v9. In ECS, Entities represent identity and scene-tree integration, while Components represent pure data.
Addon: GECS · version
v9· Godot 4.3+ · MIT
Related skills: gecs-core for setup & basics, gecs-systems for processing logic, gecs-queries for filtering components, gecs-observers for reactive property change detection.
1. Design Principles: Entity Glue vs Component Data
| Trait | Entity (e_*.gd extends Entity) |
Component (c_*.gd extends Component) |
|---|---|---|
| Base Class | Entity (inherits Node) |
Component (inherits Resource) |
| Role | Glue between SceneTree and ECS World | Pure data container |
| Methods | Allowed: Node cache, lifecycle callbacks | Forbidden: zero game logic or behavior |
| Node References | Keeps references to child nodes (Sprite2D, CollisionShape2D, etc.) |
Never store node references |
| Persistence | Instantiated via scenes or code | @export variables automatically serialized |
| Queryable | Grouped into archetypes | Used as archetype filter tokens |