Game Views

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

    • From the views portion of the book it seems each view is for one actor. So each human view controls one player, meaning a four player game would have four human views with only one drawing to the screen (assuming everything is on one screen, with split screens each view would draw its own portion).

      Extending this to an AI view, would each AI have its own view, creating multiple AI views for each AI actor?

      In a related vein, an AI view seems more reactionary (responding to events and passing the info along to a corresponding AI component in the actor to handle). Due to this, does it do anything in its update function? The human view uses update to check for input from devices and translate those into messages. I suppose the AI view could check the condition of various stimulus, but it seems it does that in its response to events and the AI component would handle most of those checks (and its update function is already called through the logic system).

      The post was edited 1 time, last by Trinak ().

    • I came to this struggle as well, and came to the conclusion that it is dependent on the type of game, imagine this scenario from two common games

      Goldeneye

      Each player has an associated view which takes up a portion of the game screen, the view directly controls the actor it represents through game commands, if there was AI in goldeneye (why on earth wasn't there?), than it would have definitely used an 'AI View'. This is also assuming these games use the MVC architecture.

      Starcraft

      Each player actually represents not a single actor, but a logical system representing an entire race (buildings, territory, units, etc). In this case the view would attach to a 'race' id maybe, OR if you made an actor which was simply had management components for a group of other actors, this would also work.

      *Edit*

      Also, this may not be the right way to do things, but I actually made human views each render to the screen in the case of a multi-viewport game, I handled this not by making multiple scene graph stuctures, but by using Ogre3D's scene graph, and having a camera component make a new representation of the world from a viewpoint.
      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

      The post was edited 1 time, last by mholley519 ().

    • Exactly, I expect the performance and memory usage is quite significant with duplicate scenes.
      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