That looks good. Why did you decide to make an engine out of it?
The entity/component model (as described for example here) is certainly a way to go, although it can have many approaches. We often use code generators for various stuff, so I guess we'll use one for the game entities too. As I said also elsewhere, our engine is rather monolithic, an optimized special purpose world renderer.
I would certainly not break the components to such small atoms like a separate Orientation and Position.
Another thing is that the engine should be designed to allow for effective batch processing in rendering (or physics; anything that can be processed in parallel on GPUs), so the componentization should reflect that too. It will probably require a clever management of entities' data.
I've given things some more thought and have decided to go for this way:
components register to some sort of interface for the subsystem. For Example: RenderInterface. This renderinterface manages the required component and lets the subsystem access them, without knowing of the components.
In this way you can easily decide to add another component to the interface and implement it in the subsystem.
The rendering subsystem would for example render but would also sort and batch the geometry.
I do like the idea of a seperate position component because the components in my implementation arent actually components. They are data containers with events, that can communicate to other components, and subsystems, via a broadcast/listener system.
So the entity is nothing more than a container for components (nothing else).
The component have functions/properties ONLY for variables, and events. (they are like property/event containers)
Components register themself not to a subsystem but to a interface.
This interface handles communication from the subsystem to the component. (and of course a component can send a message when the subsystem decides to change something).
So for example:
- Entity
- Name
- ID
- Decription
- List
- Component
- Name
- Owner (EntityID)
- Properties/Fields
- MessageHandling
- Interface
- properties (setters/getters) that handle components
- It also manages things like: what if entity does not have component, etc etc.
- Subsystem
- System where logic is.
- Gets it's data from a list of interfaces
- Does not need to check if components exist or not, interface handles this.
I think this will give a very solid base to build a engine upon. The main problem is to be very careful with selecting components, and what's in them (not too generic, not too vague).