Original Post
I have a few C++ design questions I'm unsure about.
For a while I've avoided any kind of entity system in my game but now the game is getting pretty large and has a lot of game objects that need to be created. When clients connect to the server, the server sends down every object on the server (players, projectiles, flags) This was messy without some kind of entity factory system because I'd have to know the order of game objects being sent down from the server.
So now I have a base entity class which has a ReadFromPacket method so I can just loop through the number of entities being sent and create each one. Now the problem is that some entities need different arguments in the constructor / draw / update methods because some entities need to use different subsystems (Renderer, Sound, Input) Should I just have global pointers to them subsystems so anything has access to them? Currently I'm just passing them around to things that need it but that doesn't play well with an entity system.
For a while I've avoided any kind of entity system in my game but now the game is getting pretty large and has a lot of game objects that need to be created. When clients connect to the server, the server sends down every object on the server (players, projectiles, flags) This was messy without some kind of entity factory system because I'd have to know the order of game objects being sent down from the server.
So now I have a base entity class which has a ReadFromPacket method so I can just loop through the number of entities being sent and create each one. Now the problem is that some entities need different arguments in the constructor / draw / update methods because some entities need to use different subsystems (Renderer, Sound, Input) Should I just have global pointers to them subsystems so anything has access to them? Currently I'm just passing them around to things that need it but that doesn't play well with an entity system.