Engine Architecture

Hello everyone,

I am new to these forums here.

I am wondering if anyone has any good resources (links, etc..) for designing a 3d engine.

I do not need links on how to create one (writing the code), but i am trying to explore some different engine architecture's as i am getting ready to create my own personal engine to be used in a product of mine.

To help with answering my question it would help to know my experiance / background.

I have been programming in java for about 3 years, and have been programming exclusively in C# for the past year.
Used to program in other languages a long time ago, "basic" and such.

I can say that i am very efficient in object oriented programming concepts and the code.

I have also been 2d and 3d modeling for quite some time now, just more so as a hobby.

Most of my programming experiance is in applications that use bio feedback, database programming and other odds and ends.

So yea, i just didnt want this post to seem like a question on "how to program a 3d engine", more so like I stated just trying to figure out how i want to architecturley design the engine and could use some help (maybe examples of some other 3d engine architectures) but have came up short looking by google.com for some examples of engine architectures.

Thanks again for any post's / comments and i look forward to speaking with you all in this community in the future,

P.s.
Sorry for the long post for such a short question

Andy



Answer this question

Engine Architecture

  • RBrady

    I have maybe a related question, and perhaps some assistance to the original poster. Check out http://www.devmaster.net/engines/ for open-source game engines. You could look at docs/source to see how someone else did it.

    My question: what example (in the DXSDK) is the best starting point for a first-person-shooter type game. I am developing a 'cupid finds his mark' in honor of today....

    K



  • KimberlyL

    What an awesome topic and welcome to the forums.
    It's really such a broad topic and I would like to sit here and discuss it all day but let me start out by saying. Design an engine like you would logically would. You normally break down a problem into smaller components and this is no different to any application or "engine" you might author.

    When I start out I take a piece of paper and write/sketch down the components of my "game" or vision. This boils down to a few managers and abstraction is definitely the key to a robust and reusable engine. What do I mean by this

    Specifics is what makes reusability obselete. You really need to focus on abstracting things like renderers so that you can do the implementation in such a way that it doesn't change the use of the Renderer itself.

    Let me go over some of the managers and what their uses are in engines I typically code.

    Resource Manager:
    Loading and handling resources is a key in any engine. My engines use a hashtable for storing textures and meshes. The reason I use this is due to the speed and easy access to resources after they have been stored into the hashtable. You could easily provide methods to get textures by just supplying the uniquely idenfiable key.
    e.g.
    Texture GetTexture(string resourceKey);

    Renderer:
    a Renderer is probably the most debatable topic of all the managers I list. I generally make it simple and pass it a scene to render. The scene contains an entity list. Using a simple foreach loop you could iterate through all the entities and render them.
    foreach(RenderableEntity entity in scene.EntityList)
    {
    ///Do rendering
    }

    Scene:
    A scene represents exactly what it's called. Loading and updating of the scene is handled here. It also keeps the infamous entity list which can be either an ArrayList or List<> which is typically what I use.
    e.g.
    List<Entity> entityList = new List<Entity>();

    Entity:
    Just an entity. This entity will represent a general entity and you can choose whether it must be an abstract class but as we know. Not all entities are renderable. Things like boundaries can be entities which you don't generally want to render.

    RenderableEntity:
    An entity that derives from Entity that will hold references such as strings to textures and meshes. This will help to reduce memory load as each entity won't have each own mesh. This helps due to the fact that each mesh/texture has a memory impact and if you just hold references. The only instance of that resource will be held in the resource manager

    Input Manager:
    Just handles input

    Network Manager:
    Handles network messages to and from the client/client or client/server.

    I hope this helps.
    Take care.


  • David K Allen

    I am new to these forums here.
    Welcome to the forums - hope you enjoy your stay

    Writing a 3D engine is one of those things that everyone seems to be trying these days, but it is probably one of the most difficult parts of modern 3D graphics programming. Getting individual tricks and effects working is one thing, but getting lots of tricks and lots of effects all working together as one big happy family is a whole different challenge. I don't wish to sound negative - but you want to realise that it's no small thing you're looking at taking on.

    With that in mind, it might be useful for you (and for us if you want more help) to define what the engine is going to be used for. A terrain/outdoor or Indoor based What sort of game/application do you want to use it for - for example, a flight simulator has a very different set of requirements to a fast paced FPS.

    As far as recommended resources... Given the problem is primarily architecture based, I'd recommend reading some of the classic texts (e.g. Code Complete and Design Patterns) on software engineering and design. Books like Real-Time Rendering will give you a good overview of graphics programming and how you might want to architect things. You might want to browse the books section on GameDev.net - Game Programming, Graphics Programming and Software Engineering contain a large number of books that I'd recommend.

    A while back I was involved with a thread over at B3D about someone wanting to start a similar project. You might find it a useful read: Very frustrated with progress -- advice

    Examples of games engines are fairly hard to find - their either too complex/ugly to be a useful example, or people put so much time and effort in that they don't want to just give it all away for free. Browsing forums such as these and GameDev.net's yield lots of conversations that you can learn from though.

    hth
    Jack



  • Lexite

    Thank you very much for the repli.

    And yes i understand why people wouldnt display such content. Though i'm not looking for code.

    Just a basic class diagram of how people organize the general structure of there engine.

    I already have a general idea of how i want to design the system architecture, but before i ever do anything i try to look at as many possible ways of doing something just to compare. Seems doing things this way just helps me plan, organize and eventually code.

    As we all know designing applications is about 70-80% design and anaylisis and about 20-30% actual programming.

    I am going to have a look at those links you game me right now, see if there is anything in there that refers to my question. Basically what i will be using this engine for in the begining is just to render some models and display them.

    As i build upon the engine to include physics, lighting etc.. I will then plan on using it to provide some very simple games to use hand in hand with my software.

    Yes i know an engine is no small task but i wont be needing to design one that works like the unreal engine.

    I would have to say that the math involved is quite trivial to me, and that i have designed and implemented some pretty complex systems in the past.
    But thanks for the heads up in case i didnt realize:)

    As far as why everyone is interested in creating game engines now days i wouldnt know Could just be people need a simple engine to use with there software like me:P

    Thanks again for the post,

    Andy


  • Engine Architecture