Component based Entity System

Notice: This is a post I reposted from my old website.

Started development of a basic Entity-Component-Framework where Entities are limited to an abstract implementation where no actual “Entity” exists. An Entity is made up of different components.

Components have no real “logic” included in them. They are merely containers for values. E.g. a PositionComponent only holds x,y values, whereas a ImageComponent contains a image variable of some sort.

Systems operate on Entities which contain the apropriate number and type of component. A MovementSystem only operates on Entities that have a PositionComponent as well as a VelocityComponent.

Real simple stuff. But it really helps because it lays heavy emphasis on composition instead of inheritance which can make many things a lot simpler 🙂

I will put it on bitbucket later so everyone can check out the code.

Edit: You can now find the code at my bitbucket –click-.