CMSC 491E/691E: Computer Graphics for Games

Assignment 2

Interactive Application

Due February 23, 2004

The Assignment

For this assignment, we are going to create a simple boardwalk/fair style shooting gallery. This will require loading external models, performing model and display updates when even when the system is idle, and using the Wild Magic picking functions to register hits or misses.

You may either base this assignment on the same application you modified for the last assignment, or choose a new one. The models are a duck and teapot, both in VRML's wrl format (a simple text format). You need not be able to read any VMRL file for this assignment, just the two given. These files sample files include some material information, vertex locations, and sets of faces defined by vertex index. You may ignore information in the file (even model structure) that is not relevant to the project.

Place several ducks and teapots of similar scale on a disk that rotates in and out of view. The disk should continue to rotate, even if the player is not taking any action. When the player shoots at an object, use picking to determine which object was hit and tip that object over. You should show a running score, unchanged for a miss, increased when the object they hit is a teapot, and decreased when the object they hit is a duck.

CMSC 691E Students

Students taking the graduate version of the class should find, create or convert some other model to represent the shot/dart/ball (or whatever you decide it is).

Hints

  1. This assignment will be considerably harder than the last. Start early!
  2. I'd suggest initially printing model information as you read it in to make sure you are interpreting the file correctly.
  3. Given the requirement that you only need to be able to read and show these two models, you should be able to make your reader can quite simple (e.g. scan for keywords, read streams of numbers, assume the file contains no errors).
  4. There's an example of picking in the BezierSurface application.
  5. There's an example of drawing text in DrawFrameRate in WmlApplication.cpp in the Application2 or Application3 directories.

What to turn in

Email to me a zip file or gzipped tar file containing: