Logic in Entity Components Sytems
- by aaron
I'm making a game that uses an Entity/Component architecture basically a port of Artemis's framework to c++,the problem arises when I try to make a PlayerControllerComponent, my original idea was this.
class PlayerControllerComponent: Component {
public:
virtual void update() = 0;
};
class FpsPlayerControllerComponent: PlayerControllerComponent {
public:
void update() {
//handle input
}
};
and have a system that updates PlayerControllerComponents, but I found out that the artemis framework does not look at sub-classes the way I thought it would.
So all in all my question here is should I make the framework aware of subclasses or should I add a new Component like object that is used for logic.