amirabiri
04-01-2011 21:23:33
Hi all,
So the time has come and some old friends and myself are going to try and build a little game. Now I will try to use the skills I have been learning slowly for the past two years...
I was wondering if anyone would have some insights or advice to share in the area of how to design the core game engine, i.e the thing that strings together Mogre with a physics library, sound lib, GUI etc, and most importantly updates the game state all the time.
For examples, some questions that I have in mind:
So the time has come and some old friends and myself are going to try and build a little game. Now I will try to use the skills I have been learning slowly for the past two years...
I was wondering if anyone would have some insights or advice to share in the area of how to design the core game engine, i.e the thing that strings together Mogre with a physics library, sound lib, GUI etc, and most importantly updates the game state all the time.
For examples, some questions that I have in mind:
- Should I aim to update the game state as fast as I can (i.e run game logic in a frame listener)? Or should I aim to call the update method every set interval?[/*:m]
- But shold a big list of all game objects iterate it each game tick and call something like Update() (even if its empty), or should I aim to reduce the iterations by having smaller collections of clear per-frame roles? i.e Moveable objects, Gamelogic objects, collidable objects.[/*:m]
- (kind of a followup of the previous question) Should I try and avoid polymorphism and virtual methods for performance? i.e should I have a collection of IMoveable objects with a Move() method, or separate collections: LinearMovement, BallisticMovement, etc and iterate each one?[/*:m][/list:u]
And so on...
Please feel free to share any thoughts or point me in the direction of any good material on this topic that I've missed.