SceneGraph

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Hey everybody,

      i am a bit unsure about where to put the my scenegraph in my engine, so i took a look at the gcc4 again and i was a bit surprised to find it attached to a HumanView, so i want to ask: Why is that?

      As far as I understood it, a GameView is a certain interface to communicate with the game logic, for example a 2 player game would have 2 HumanViews, one for each player. But wouldn't i have just 1 Scenegraph for both of them? since they play in the same world, why would i have 2 identical graphs for the gameworld?
    • This is something I wondered as well, I ended up using exactly what you described, a single scene graph, which is interfaced by Cameras and user input. There isn't any real right way to do this, but this is what I ended up doing.
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • RE: SceneGraph

      It's in the human view because that's where it makes sense within the architecture. Most modern games will only have a single human view instantiated. Other players will be represented with a network view.

      Even in a hot-seat game, you will likely only have a single human view. The view probably shouldn't care about whose turn it is as that's a game logic concept. When the player hits the "end turn" button, the game logic switches its internal state to start accepting input for the second player.

      If you have a split-screen game, it might be worth splitting out the scene graph and the human view. If that were the case, the fix would be trivial: just decouple the creation and destruction of the scene graph from the human view. Then you could create two human views and point them both at the same scene graph. Another option would be to make the scene graph static. That would be a bit easier, but you wouldn't be able to have multiple scene graphs if you wanted them.

      -Rez