Avatar Architecture

Avatars
Avatars are Entities in the world that are controlled by a player controller or an AI controller.

They have some actions available to them, that the controller can make them do, and may have some sensors that receive perceptions from the surrounding Environment, which can be forwarded to the controller.

Effectors
An effector is some component that an avatar has, which allows it to somehow affect the surrounding environment and world.

It receives command objects that contain directions for what kind of effects it should do. Command objects are executed in sequence, with higher priority command objects done first, otherwise in the order they arrived.

A command can also be canceled, and all pending commands can be canceled if needed.

A command that is being executed that is canceled may have a partial or no effect on the world.

Sensors
A sensor is a component of an avatar, which receives some kind of information of the world, and encodes it in Perception objects.

The perception objects are sent to the controller of the avatar by default, but can also be filtered if the controller doesn't need some of them.