The way that I did it is almost exactly how bovine.genius said. The components should only be individual pieces of data that differ from one actor type to the next. The way I implemented them they are just holding the same variables you'd normally put in an actor/entity class.
So, yes if you have 1000 of them, you more than likely did it wrong. You can have different actors by giving them those "components" or not(or setting to default values), along with changing the actual data inside of the "components". The systems that act on them should only act on one particular set of variables/component, mostly anyway. Physics should do anything with health, unless your returning a value, like the force of the actor colliding with something, from it to send to whatever manages the health.
3 hours ago, bovine.genius said:
You can still have your entities be classes (or even just structs), but you don't put any functionality in them. Then you have a render function that works on an array of entities, and similarly for physics and AI.
My components are just structs that provide different pieces of data, model, transform, physics, ai, etc. In fact my Actor/Entity class is just data, it also has a std::map (could be a std::list or even a std::vector instead) of those structs.
The functionality comes from the class managing all the actors. It just checks to see if the current actor has certain components, if not it does nothing, if it does then it does whatever it needs it to. The only functions my actor class has are helper functions to reduce the amount of code I have to write to get a certain component, and an initialize function that reads an xml file to get the components.
All of my components are however derived from a base class so the initialize function could be different for each, they all take only a TiXmlElement* so that I load just one xml file per actor/actor type, and pass the relevant part to the right component.
Its entirely possible to achieve basically the same effect with just an entity class, but I wanted more modular actors. For instance, a building needs physics (infinite mass so it doesn't move, and a physics shape) so you don't walk through it, but it more than likely doesn't need AI, or stats (which I could have just initialized to default values).