I have been working on my component based game object design. The thing I got stuck is what is actually Game Logic? Is it, for example, players health, ammo, and other in-game related stuff? If yes, should I consider my "game object" as a game logic element.? The thing I am trying to make is, every subsystem has its own container which stores the id of the component and the entity depending on the subsystem:
Graphics -> MeshEntity
ParticlePhysics -> ParticleEntity //physics is not main concern, so not worried about this one
RigidBodyPhysics -> RigidBodyEntity //"" "" "" ""
Logic -> LogicEntity
and each subsystem updates its data in its own world and the events occur between subsystems rather than between components. So, Game Object is more of a helper class to combine these stuff and remove from subsystems with one system call like:
delete myObject;
(which will trigger deletion of entities in the subsystems it uses)If the GameObject is a Logic Element, I can just use (e.g) health_component, ammo_component etc, and totally remove Logic Subsystem and use HealthSubSystem, AmmoSubSystem etc
btw. is this a good design for a game entity class in terms of performance and memory?
I hope I could explain what my problem and idea. Sorry for english (not my primary language. working on fixing it).
Thanks,
Kasya