Posted 13 October 2010 - 06:16 AM
2) Game Rules/Logic
3) Collision Detection/Response
4) Update Objects
Also, can any of these steps be re-ordered without it affecting the overall process?
the exact question im stuck on is: "Does the ordering of the stages in the pipeline you drew matter? What parts of the pipeline can the
ordering be changed?"
Thanks for the help guys, im just trying to get my head around this.
Posted 13 October 2010 - 07:04 AM
The stages you list could certainly be included in a game engine... but it could be arranged in a different way too. For example, why is AI separate from game logic (in my experience, it's more common to have AI as part of game logic). Why is Physics separate from Collision Detection/Response? And why is lumped together with FX (and btw, why is FX not put together with Render?). Where does audio fit in? Wouldn't you need to recieve (and process) network messages at the start of the frame, near I/O (which should probably be called Input, as you're not doing any output at that stage), and send network messages after all the game logic have been done?
The simplest form of structure for a game engine is:
where Update is broken down further into all the bits needed to update the state of the game simulation, and Render is broken down to the bits needed to display the result to the user. But even this structure is not adhered to by every engine.
- www.mattiasgustavsson.com - My blog and current projects
- www.rivtind.com - My Fantasy world and isometric RPG engine
- www.pixieuniversity.com - My Software 2D Game Engine
Posted 13 October 2010 - 07:22 AM
Rendering is usually dependent on the result of Physics, AI, etc, so You want to do the rendering last. But The AI is dependent on the physics, and the physics is equally dependent on the AI.
The way you order them means that either the AI or the physics needs to work with old data. Which one should have the most recent data is up to you to decide, and depends entirely on your game and implementation.
Posted 13 October 2010 - 07:44 AM
1. Draw the game-engine pipeline and explain in your own words each stage of the pipeline.
2. Does the ordering of the stages in the pipeline you drew matter? What parts of the pipeline can the ordering be changed?
So is question 1 pretty much a trick question? Seeming as the orders differ from engine to engine...He says he wants definitive answers but from what you guys are saying and from what i've been reading online there is a million and one ways to do it right.
Thanks again for the help guys
Posted 13 October 2010 - 02:25 PM
I agree with Matthias that collision detection is really a part of the overall physics of a game, if there is complex physics being implemented. (For example, there isn't any in Space Invaders.)
However, I consider AI and game logic to usually be different, but it's probably more semantics than anything. AI would be non-deterministic things like pathfinding, whereas game logic is more of a "fixed rules" engine, like "your basket can only hold 10 swords". Game logic usually comes into play pretty early, because it checks if the message into the system is a valid one. Input of "Please add an 11th sword" would be denied early, and save processing, animating, etc.
One thing's for sure, for each "tick" of your game world, it generally always starts with input queue and its immediate processing and ends with the pure visual render of the end-state of the game world.
The middle part is mushy, especially in multi-threaded architectures...
Posted 15 October 2010 - 11:27 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users