- 3,300
- 1,260
- Entities: Empty objects with unique IDs that can have multiple components attached to it.
- Components: Different facets of an entity. ex: geometry, physics, hit points. Components only store data.
- Systems: Where the logic is. They do the actual work by processing entities and modifying their components. They are data processors, basically.
- Queries: Used by systems to determine which entities they are interested in, based on the components the entities own.
- World: A container for entities, components, systems, and queries.
- Position: The position of the entity on the screen.
- Velocity: The speed and direction in which the entity moves.
- Shape: The type of shape the entity has: circle or box.
Now we will define the systems that will hold the logic in our application: - MovableSystem: It will look for entities that have speed and position and it will update their position component.
- RendererSystem: It will paint the shapes at their current position.