3 ms·
Entity-Component-System (Which I think is more correct than Entity-Component system) It's a pattern of organizing data and code that consists of: Entities: Co
by gpm 8y ago
Entity-Component-System (Which I think is more correct than Entity-Component system)
It's a pattern of organizing data and code that consists of:
Entities: Conceptually these are like objects, in memory they might just be an index.
Components: Conceptually these are like fields on objects, they can typically be added and removed unlike normal fields. If entities are being represented as index's, each different type of component is generally stored as some form of Map<Entity, Component>.
Systems: These are where you store your logic, they typically iterate over all entities with a given set of components and do something. For example iterate over all entities with a position and velocity components, and do position += velocity * dt.