MP2 Part 2: Flight Simulator Navigation

Due: March 16 at 11:55pm

 


 

Write a simple flight simulator using WebGL to handle the display. Your "plane" will fly over the terrain you generated in the last MP.  Add a cloud of fog to your terrain.

The airplane should automatically move forward at a fixed speed. The user will control the bank and tilt of the airplane through the arrow keys.

  • Pressing the left (right) arrow key will make the plane roll to its left (right).
  • Pressing the up (down) arrow key will cause the airplane to pitch up (down).
  • Pressing the + (-) key will increase (decrease) the airplane's speed

You will need to implement the following

  1. A quaternion based viewing system.
    Note: The glMatrix library provides support for using quaternions...and you should use it [link].
  2. A user interface that minimally implements the arrow-key and +/- key controls described above. You can add additional controls to affect yaw if you wish.
  3. Your webpage should include text instructions describing how the user interface works. 
  4. A cloud of fog, placed over and around your terrain.
    Note: The fog computation should be done per-pixel, which means implemented in the fragment shader. 
  5. Implement controls which turn the fog on and off in the scene.
  6. Commenting: You should comment each file with an author comment and comment each function you write with a header. Use JSDoc comments with the appropriate tags and types.
                            Details can be found in the Google JavaScript Style Guide.

Submission:

You will name the directory containing your work ${NetID}_MP2.  Create a zipfile of this directory with name ${NetID}_MP2.zip, and upload it to compass. Include all of the files necessary for your application to run locally. Name your webpage Flight.html

 

Rubric:

Feature Points Description
Documented and interactive UI 1pt Using keyboard or mouse to control your plane interactively and your user interface explained on your webpage
Translation  1pt The plane should move forward automatically.
Roll  1pt Apply correct rotation when your plane rolls left or right.
Pitch  1pt Apply correct rotation when your plane pitch up and down.
Speed 1pt Include the ability to speed up and slow down the plane
Fog 1pt Include a layer of fog over and around the terrain