1 Entity
Booklordofthedings edited this page 2024-11-23 10:04:51 +01:00

Entity:
Entities in Theater-ECS are effectivly just 32 bit numbers.
Different from some other ECS implementation they dont actually store which components they have directly.
Instead they just hold an index into the component arrays and a version thats used to identity wether an entity is still alive.
The 32 bit version has an entity limit of roughly ~1'000'000 entities alive at once. This should really be enough for most games, though if you need more entities.
The size of an entity could be increased to 64bits which would give 4'000'000'000 slots and if you where really desperate and had a pc could actually handle it you could probably give the entity a full 58 bits to work with and use however many entities that would be.
As of now 64 bit entities are not supported yet

Entitiy has two properties, the Version and the Id however these are mostly meant for internal use.
Users of the library should handle Entity as it it where just an opaque struct.