Hey guys,
I've read through the book a couple different times now and I've almost got my engine completely written using GCC4 as an example (convered to .NET / XNA).
The only thing I'm having trouble with is the responsibility of the GameLogic class. I look in the GCC4 code base and I see a public "MoveActor" method on IGameLogic, but I can't figure out when or who would ever call this as I thought things like moving actors were event driven (controller realizes a key was pressed, so it fires an "ActorMoved" event that's then caught by GameLogic who then uses the physics system to move the actor. Is my thinking off here?)
I had originally thought that the Application instantiated a GameLogic and fed it it's views, then told it to update and render itself on each tick. The GameLogic itself would then just coordinate the Update / Render of each of the other systems (physics, views, actors, events, etc) but it looks like it has more responsibility than that. Could someone clarify?
Lastly, why is there a base GameLogic in the engine and an inherited version in the Application? Is this so that I could potentially create more than a single game using the same engine?
Thanks!
I've read through the book a couple different times now and I've almost got my engine completely written using GCC4 as an example (convered to .NET / XNA).
The only thing I'm having trouble with is the responsibility of the GameLogic class. I look in the GCC4 code base and I see a public "MoveActor" method on IGameLogic, but I can't figure out when or who would ever call this as I thought things like moving actors were event driven (controller realizes a key was pressed, so it fires an "ActorMoved" event that's then caught by GameLogic who then uses the physics system to move the actor. Is my thinking off here?)
I had originally thought that the Application instantiated a GameLogic and fed it it's views, then told it to update and render itself on each tick. The GameLogic itself would then just coordinate the Update / Render of each of the other systems (physics, views, actors, events, etc) but it looks like it has more responsibility than that. Could someone clarify?
Lastly, why is there a base GameLogic in the engine and an inherited version in the Application? Is this so that I could potentially create more than a single game using the same engine?
Thanks!
-bullgoose