Entity

An entity is an individual, distinct object in a world.

Identity

Each entity has a stable identity within a world. This is an important feature of the system, allowing for addressing entities directly when needed.

Entity identity can be set to character strings of arbitrary length. Following are some examples of addresses.

# The first part of the address is always the entity
person_01.mind.curiosity
cat.body.stamina
4839475.23.21

As you can see, entity identity can suggest the kind of entity it is, but this entirely optional. What if the entity goes by some random number id?

Composable state

Entity state is not defined or constrained by any type or class hierarchy. It's also not defined by its identifier, though the id can definitely suggest something about the state to make inspecting the world easier.

Instead the entity state is defined by the components attached to it.

This way there is a clear distinction between what exists in the world (the entity) and what is true about it (its component data).

Prefabs

One example of an entity could be a person.

In a world of millions of people, each person is distinct, albeit they're still a person, meaning they most likely share some characteristic features with all the other people out there.

We can use prefabs to define entities with similar characteristics ahead of actually composing them at runtime.