Skip to main content

Crate ooecs

Crate ooecs 

Source
Expand description

This implementation of the ECS differs from the traditional approach in several respects and is intended for use in specific scenarios where its strengths are important and its weaknesses are irrelevant.

The first difference is that archetypes form an inheritance tree. So, if you have three components, you cannot simultaneously have an entity containing only components 1 and 2, an entity containing components 1 and 3, and an entity containing only components 2 and 3.

The second difference is that there are no systems in the traditional sense, where they are automatically applied to all entities containing the required components. Instead, you must explicitly organize the lists of entities (or other structures, such as trees) that the systems will work with.

See the README for a usage example.

Structsยง

Component
An ID of a piece of Entity data and Entity archetype.
Entity
Unique identifier for an entity in a World.
World
Stores entities, and components.