IMGD40000 Practice Final Exam Solution

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

    Answer:
    - Complete solution, all features in place at start of development
    - Proven, robust code base
    - Usually cheaper than building it (time is money)
    

  2. Briefly, what is Kinematics? What is the basic kinematic equation relating distance, velocity and time?

    Answer:
    - Kinematics is the study of the motion of objects without taking into
    account mass or force.  Basic units include position and time, as well
    as their derivatives (velocity and acceleration).
    
    - One of the most fundamental kinematic equations for the distance an
    object travels is: d = vt, where d is the distance, v is the velocity
    and t is the time.
    

  3. What additional physics criteria lacking in kinematics do Newton's laws incorporate that provide for more realistic movement of objects in games? What is Newton's fundamental equation relating force, mass and acceleration?

    Answer:
    - Force and mass. 
    
    - Newton's second law states f = ma, where f is the force vector
    applied to an object, m is the mass of the object and a is the
    acceleration vector.
    

  4. What is numerical simulation? Why is it used for physics in games?

    Answer:
    - Numerical simulation is a technique for incrementally solving
    equations of motion when the forces applied are not constant or when
    there is otherwise no closed-form solution.
    
    - Numerical simulation is used in many games since the conditions
    (non-constant forces) hold for many conditions, such as objects moving
    with friction (including air resistance) and with complex,
    interconnected joints.
    

  5. Numerical simulation can have errors versus a closed-form solution (if known). What are two techniques to minimize this error?

    Answer:
    - Increase the update rate of the physics computations.  More frequent
    computation results in a decrease in the error for each computation
    and an overall decrease in error.
    
    - Use more sophisticated numerical integration methods.  Euler
    integration is effective, but basic. More advanced algorithms include
    Vertlet, Runge-Kutta or others.
    

  6. Briefly describe (short sentence or phrase) 2 techniques to speed up collision detection versus simple (compare polygons of all objects) collision detection.

    Answer:
    - Use bounding volumes to reduce the polygons to compare for complex
    objects.
    - Partition the collision space (game world) so as to only compare
    objects in neighborhood for collisions.
    

  7. What does "best effort" mean in the context of Internet networking and why does this matter for network games?

    Answer:
    - "Best effort" in the Internet means there are few (or no) guarantees
    on the time it takes to deliver a packet.  There are also few
    guarantees of arrival certainty.  Packets can arrive quickly or
    slowly, in order or not at all.  Mostly, however, a packet that does
    arrive intact will not be corrupt (all bits in the packet are as
    sent).
    
    - For network games, this means the game must be resilient to
    variations in timing (latency) and loss, not necessarily
    counting on low latency delivery for a good gaming experience.
    

  8. Provide 2 reasons a network game should use TCP over UDP. Provide 1 reason a network game should use UDP over TCP.

    Answer:
    - TCP should be used: 1) if in reliable, in order delivery is
    paramount and 2) if potential delays of several round-trip times
    between game nodes will not adversely affect performance.
    
    - UDP should be used if minimal latency is critical for the
    game experience such that extra delay from retransmission
    will ruin the player experience.
    

  9. What is the network Maximum Transmission Unit (MTU) and why does a Internet network game programmer care about it?

    Answer:
    - The MTU is the largest size a packet can be on a network without
    fragmentation.  On the Internet, this is typically 1500 bytes (bounded
    by Ethernet frame sizes).
    
    - An Internet network programmer using UDP (or a third party service
    using the same), should be careful not to have data payloads that
    exceed 1460 bytes (1500 bytes - the IP&UDP headers) so as not to have
    packet fragmentation.
    


Return to the IMGD4000 Home Page