IMGD40000 Practice Mid-term Exam Solution

  1. In a single phrase or sentence each, describe two reasons why you would buy a game engine (as opposed to building one).

    Answer:
    
    1) Financial - don't have money
    2) Time - don't have time
    3) Sequel - used commercial engine for last one
    4) Support -  large user community and documentation
    5) Robust - tried and true code base
    6) Experience - development team has prior experience with engine              
       (variant of time)                                                           
    

  2. Consider a game where an AI controlled unit responds to an enemy. If the enemy is visible and close, the unit attacks. If the enemy is visible but not close, the unit moves closer. If the enemy is not visible but is audible, the unit creeps. If the enemy is not visible or audible, the unit patrols.

    1. Draw a decision tree representing the AI for the above game unit. Label all nodes and branches.

       
        Answer: 
      
        root note "visible?"
        1st level "audible?" and "close?"
        2nd level "walk", "creep", "patrol", "attack"
        Left branches are "no" and right branches are "yes"
        

    2. Write pseudo-code corresponding to your decision tree, using only if-then-else statements.

        Answer:                                                                   
      
        if visible? {                                                                
          if close? {                                                                
            attack                                                                   
          } else {                                                                   
            move                                                                     
          }                                                                          
        } else {                                                                     
          if audible? {                                                              
            creep                                                                    
          } else {                                                                   
            patrol                                                                   
          }                                                                          
        }        
        

  3. What is a significant drawback to using decision trees for AI behavior?

    Answer: 
    
    1)Hard to extend/maintain 
    2) Easy for player to predict/exploit.
    

  4. For in-game pathfinding, what is a Navmesh?

    Answer: 
    
    A set of convex polygons that cover navigable areas.
    

    Is a Navmesh a replacement for A*? Briefly describe why or why not.

    Answer: 
    
    No.  Navmesh doesn't provide a path.  Instead, provides locations
    (polygons) that can be used to construct path. Where waypoints are
    points on a connected graph, Navmesh is polygons on a connected
    graph.
    

  5. Name or describe in a short phrase the three fundamental properties of how the player avatar appears on the screen, which are affected by changing the position and orientation of the camera.

    Ans:                                                                         
    - Position: where on the screen avatar appears (e.g., center? bottom right?
    - Size: how big avatar is (e.g., takes up full screen, takes up tiny portion
    - Angle: what representation avatar has (e.g., profile, top-down)            
    

  6. What are the three main components in the "steering model" architecture? Provide a brief sentence or two that describes the role each plays.

    Answer:
    
    Action Selection - chooses goals and/or plans (e.g., "Go here")
    Steering - calculates trajectories to satisfy goal and produce *force*
    Locomotion - provide mechanics of how to move vehicle                          
    


Return to the IMGD4000 Home Page