Game Engine Architecture

Started by
50 comments, last by Helter Skelter 18 years, 9 months ago
Saruman, isn't the different objects that go in the inventory and weapon types game specific and there is still an inventory system which organises these things and perhaps loads the different weapon an object types out of files?
Advertisement
I have also found the lack of information out there very frustrating. I can recomend a few good articles on object or entity systems, in the book serious Game Programming Gems 2, 3, and 5. I sure that the others have some good articles about components of an engine, but I havn't got my hands on them yet! But an occuring them seems to be an object system, and an engine that is data driven. I have created a very simplified object system for some of my programs. It consists of a GameManager, ObjectManager, ResourceManager, SimulationManager, RenderManager,and InputManager. You may say what's up with all the Managers, but It makes good sense to me. I use the lists throughout the code to keep track of each "object" within the current scene. I have also tried to make it a bit data drivin with some simple stdio.h file reading to get info about the objects to create.

For example the ObjectManager will open a script file that has the nubmer of objects to create and variuos variables for my given project like X file names, Bounding sphere dimensions, if the object is static or dynamic.

So my GameManager is coordianting all of this by the way. After the ObjectManager creates the objects it returns a list that list is then passed to the ResourceManager. This is where all my meshes are loaded. This manager also keeps track of validity
of the resource, in DX terms has the device been lost or destroyed, etc.

On certain Physical systems simulations I have then passed the list to the SimulationManager that runs a simulation on objects that are flaged as dynamic, although at this point it has only been one object. I haven't quit got to incorperating different simulation code into my engine. Although this may be trival to hard code in I would like to find a solution to dynamically load simulation code for different physical simulated objects within different "scenes" or "levels".

It realy seems like ya just got to get all the knowledge that you can start to code this guy up with some functionality in mind and then when it breaks start again with the break in mind.

One area that I am not sure about is communication between components. I havn't found much out there about that, but one book that keeps poping up about a lot of this stuff is

Design Patterns: Elements of Reusable Object-oriented Software by Erich Gamma

Numerious articles I have read in the Gems have referenced this book. (my girlfriend is picking it up for me at the library as I type, or perhaps sometime today before she comes home)
Thanks for that Shawn let me know if that book your getting turns out to be of any help.
Quote:Original post by BoReDoM_Inc
Saruman, isn't the different objects that go in the inventory and weapon types game specific and there is still an inventory system which organises these things and perhaps loads the different weapon an object types out of files?

Nope those are game specific actions / logic. You wouldn't find anything like that in a normal game engine as it is part of the game itself.

If you want to seriously learn game engine design and architecture I would recommend that you pick up David Eberlys books along with going through the code of existing engines such as Ogre, Irricht, etc.
I'm also very intressted about finding more information on this.

I would also know more about how professional engines manages or works with DLL conponents and how they share data between exe and DLL. And also how the engine should work with a client and server (not only for networking) design... Like if you host and play on the same computer, what would the communication be? should there be totaly diffrent applications for the client and server and how would they both have access to the resources (cause i guess the server will need it for validating things and client will need it to render).

So if anyone have any good information regarding this, please share.

\\ Xeta

[Edited by - Xeta on July 4, 2005 4:38:03 PM]
Quote:Original post by Xeta
I would also know more about how professional engines manages or works with DLL conponents and how they share data between exe and DLL. And also how the engine should work with a client and server (not only for networking) design... Like if you host and play on the same computer, what would the communication be? should there be totaly diffrent applications for the client and server and how would they both have access to the resources (cause i guess the server will need it for validating things and client will need it to render).

So if anyone have any good information regarding this, please share.

\\ Xeta

Pick up Game Engine Architecture by David Eberly, as he was a lead architect on NDLs NetImmerse/GameBryo engine that powers games such as Morrowind, Dark Age of Camelot, etc. He knows what he's writing about :) He is also PhD in Math and CS.
Just read the review for the above book it seems like it might be a good book about the enginering aspect of game engine design. I just wanted to drop off a few links to some list of game engines. Some of these are free with source. So I figured that that might be a good place to start don't know why I didn't think of it before http://www.devmaster.net/engines/ http://www.cyberloonies.com/game-engines.html

Hope these might hlep some people, i'm just going to sit down and study the source code
Sorry to slightly hijack this thread, but I've been stuck on the same problem; I've been designing and redesigning my latest game engine for ages (and not getting to the coding part) as I've not got a good idea about what's good and what's not. I'd really like my engine to be well designed to save time later.

Anyway, thanks for the book tip Saruman and DevLiquidKnight, I've read the table of contents on amazon and it looks pretty good. Are the other books by David Eberly worth picking up?
Quote:Original post by Saruman
Quote:Original post by Xeta
I would also know more about how professional engines manages or works with DLL conponents and how they share data between exe and DLL. And also how the engine should work with a client and server (not only for networking) design... Like if you host and play on the same computer, what would the communication be? should there be totaly diffrent applications for the client and server and how would they both have access to the resources (cause i guess the server will need it for validating things and client will need it to render).

So if anyone have any good information regarding this, please share.

\\ Xeta

Pick up Game Engine Architecture by David Eberly, as he was a lead architect on NDLs NetImmerse/GameBryo engine that powers games such as Morrowind, Dark Age of Camelot, etc. He knows what he's writing about :) He is also PhD in Math and CS.


I actually got this book a couple of weeks ago and I agree its very good. Although it doesnt really get into client-server situations or how to implement the game logics with the rest of the egine (rules, AI, etc... ).

One other thing i cant really understand is how some engines (like the Halflife engine) has a completly diffrent DLL file for the game logics etc, while the rendering engine is in the exe file... how does the DLL file manage to use the rendering functions? wouldn't it need the exe´s header files to use them or something? ´The game launches in the exe file and then manages to use the code in the DLL file for game logics without even knowing whats there (well this is probably really wrong but i am very confused about how this works).

I'm not sure you will ever find an adequate tutorial on how to piece a game engine together. and if you did im not sure you'd want to pay it any mind. the best route on something like that is to develop your technique on the small pieces of a project and put them together as you go. all systems are different, all pieces of your puzzle are different from someone elses, so you can't really take a grand scheme from something like that.

one of my favorite quotes for game dev is paraphrased "your first 5 games are goign to suck, just do them and get the out of the way"

you will learn more by solving this problem repetitively than by reading theory on it.

if you are having problems abstracting your game code from your engine code, maybe take a project you've already done and code another game parallel. for instance i've made a platformer where you jump around on other peoples heads. a good parallel would be a figher ala super smash melee brothers. practice will teach you how to abstract engine from the game.

just start small :)

This topic is closed to new replies.

Advertisement