What's the point of having subsistems take care of components in a entity component sytem?

Started by
9 comments, last by HexDump 13 years, 3 months ago
Hi!,

I really apreciate your comments mate, they are really valuable. Have to think a little more about this, then I will come back and post my thoughts If you don't mind.

Just one more thing I have been thinking: Instead of having the entity templates, I could have functions like, createBigMonster, createNiceMouse, etc... where directly components are created doing something like:

RenderComponent* rc= RenderComponent.createComponent(entityID);
and now I could do initilization for the rendercomponent based in the type of "entity" I want to create. This functions could be wrote in script if needed. And will be dependable of all systems. The problem is that I lose the "tracking" of components, I mean, In the deleting example I won't know what components the entity is made of (what type of components) and I will have to call all systems to flag the entity as deleted. i think that what you gain from one side you loose from the other (I think this is not a correct english expression :D).

What do you think?

On the other hand, I have notiiced in your example that your systems are not as fine grained as I thought. You have a weapon system, etc... Where should a Health system come for example? Do you really use a system just for this or do you have it contained in a bigger system?.

I like a lot the idea you have suggested about systems containing 2 vectors for example, one for alive entities and other for flagged as dead and make a end of frame process for example calling the system clear() method that will recycle them into a pool, or just delete them.

Thanks in advance.
HexDump.

This topic is closed to new replies.

Advertisement