Horde3D
http://horde3d.org/forums/

Help me... please... [SOLVED]
http://horde3d.org/forums/viewtopic.php?f=2&t=971
Page 1 of 1

Author:  Orm [ 04.10.2009, 20:21 ]
Post subject:  Help me... please... [SOLVED]

I am doing my damndest to understand Game engine design and how Horde3D ties into one, but after weeks of trying, I am still drawing blanks. Please, correct anything I state in this post, because I really want to learn...

Here is what I know:
Horde3D is solely a rendering engine, designed to be tied into a larger framework as a single component, in addition to other modules such as sound and physics.

What I thought I knew:
Horde3D needed to be tied to all these components by means of a separate scene graph.

What is causing me to start all over again:
Horde3D already contains a scene graph implementation that is exposed by its API functions.

I thought of Horde3D as a function library, but I was very wrong, and now I lost a weeks worth of work over a misconception. It has gotten to the point where I am back at square one and have no idea where to go. If anyone can help me, especially in the areas of API design, I would greatly appreciate it.

EDIT:
Thank you guys for your help! I am currently making good headway on my engine thanks to the help that has been provided, and I hope that I will be able to make a tech demo sometime either this month or next month.

Author:  Volker [ 04.10.2009, 21:12 ]
Post subject:  Re: Help me... please...

You don't need to use the build in scene graph since you can add all main nodes to the root node with the root node having an identity matrix.
I guess the only problem would be the "scene graph" within a single model that contains meshes and joints. But I think it should be at least possible to change the hierarchy of those child nodes manually to let them be only adjusted by the parent model matrix (although I haven't tried that yet).

Author:  DarkAngel [ 05.10.2009, 00:55 ]
Post subject:  Re: Help me... please...

I have a few different "scene graphs" in my engine, including Horde's one:
Code:
  Horde              Physics      GUI
    |                   |          |
Group Nodes          Bodies       Node
    |                   |          |
Model Nodes          Shapes      Element


As well as different bits of middleware (graphics, physics, gui) having their own internal graphs, my game has an entity graph:
Code:
            Game
             |
          Entities
             |
         Components


The game has a collection of entities. Entities have a collection of components (entities also inherit from component, so an entity can have a collection of entities too).
My "Horde model class" (which owns a horde node handle -- i.e. owns a node in the horde scene graph) is a component. My "physics body class" (which owns a node in the physics scene graph) is also a component.
The game can then compose components together into the "entity graph" without much knowledge of what's going on inside the graphics system (horde) or the physics system etc...

The game doesn't really care about any of the particular scene graphs -- it just creates components.
e.g. the game might make a player entity, which creates a model component, which inserts a model node into horde's scene graph. But the user doesn't have to know about horde's scene graph, all they know is "I created a player".

The player entity doesn't have a Draw or Render function (that's what Horde's scene graph is for).
The player entity can move around or enable/disable the model node (in horde), but that's about it. All of the game logic (moving around objects, etc...) happens in the "entity graph", which in turn updates variables of the model components, which then update Horde's actual model nodes. The game doesn't know how to render the player (or even if it can be rendered), it just updates it's components, and then later horde will render the whole scene by itself.

Author:  Orm [ 05.10.2009, 02:05 ]
Post subject:  Re: Help me... please...

This helps me quite a bit! Thank you! My problem is where should I initialize Horde3D's resources, and how should I make the entity graph aware of Horde3D's scene graph? Because of course, even the entity graph has to know what to talk to in order to get stuff done, or would each entity have a handle to Horde's scene graph set upon creation? So when, for example, the game calls the Update() function on the scene graph, the entities would have to then make calls to Horde's scene graph which will then do its thing?

Your multi-graph approach seems like it could be very effective DarkAngel. I just need to work out how the hell to impliment a good design.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/