Skip to content
Mermaid templates

Entity-Component-System

ECS pattern — entities, components, systems decoupled.

Template previewMermaid
Rendering…

Make it your own.

flowchart LR
subgraph Entities
  E1[entity 7]
  E2[entity 8]
  E3[entity 9]
end
subgraph Components
  P[Position]
  V[Velocity]
  S[Sprite]
  H[Health]
end
subgraph Systems
  Move[MovementSystem\nreads Position+Velocity]
  Render[RenderSystem\nreads Position+Sprite]
  Damage[DamageSystem\nreads Health]
end
E1 --> P; E1 --> V; E1 --> S; E1 --> H
E2 --> P; E2 --> S
E3 --> P; E3 --> V; E3 --> H
Move --> P; Move --> V
Render --> P; Render --> S
Damage --> H