Day 24: Entity Behaviors

Last day we introduced entities. Our implementation for them was extremely general and simple: they had only attach and detach methods. If we want to adapt them to the different scenarios they are meant for, we need another mechanism. In some game engines, this mechanism is called “attachments”. For example, each entity can have a motion attachment, a physics attachment, and so on. In Artenus, we take a different approach, and handle different use cases of entities through behaviors. A behavior is a declaration of a feature or a set of functions an entity supports.

Continue reading