Skip to content

Instantly share code, notes, and snippets.

View retrokid's full-sized avatar
🎲

Efe Ertugrul retrokid

🎲
View GitHub Profile
@LearnCocos2D
LearnCocos2D / gist:77f0ced228292676689f
Last active July 14, 2025 02:38
Overview of Entity Component System (ECS) variations with pseudo-code

For background and further references see: Entity Component Systems on Wikipedia

ECS by Scott Bilas (GDC 2002)

Entity->Components->Update
  • entity = class: no logic + no data OR at most small set of frequently used data (ie position)
  • component = class: logic + data
foreach entity in allEntities do
    foreach component in entity.components do