wiki:Projects/FlightSimulator
close Warning: Error with navigation contributor "BittenChrome"

3D Computer Graphics Final Project - Flight Simulator / Cory Island

Completed in fall 2004.

Compiling

  • gcc/make:
    • Run "make"
  • Visual Studio/nmake:
    • nmake /f Nmakefile
  • */scons:
    • Run "scons"

General Controls

  • [1] Fly the plane. <-- Use one of these if you crash.
  • [2] Drive the car.
  • [3] Drive the boat.
  • [4] Go for a walk.
  • [m] Toggle between first-person and third-person view.
  • [g] Toggles full-screen mode.
  • [i] Resets the scene to its initial configuration.
  • [q] Exit.

The Plane

  • [f] Moves the plane forward and pauses motion of the plane.
  • [w] Makes the plane accelerate, unpausing it if it is paused.
  • [s] Makes the plane slow down, unpausing it if it is paused.
  • [a/d] Roll the plane (rotate about its Z axis).
  • [left/right arrows] Yaw the plane (rotate about its Y axis).
  • [up/down arrows] Pitch the plane (rotate about its X axis).
  • [p] Pause or resumes the motion of the plane.
  • [mouse] Pitch/yaw.

The Car

  • [w/up arrow] Accelerate.
  • [s/down arrow] Brake.
  • [a/d, left/right arrows, mouse] Turn.
  • [middle mouse button] Jump. It has hydraulics.

The Boat

  • [w/up arrow] Accelerate.
  • [s/down arrow] Brake.
  • [a/d, left/right arrows, mouse] Turn.

Walking

  • [w/up arrow] Move forward.
  • [a/d, left/right arrows, mouse] Turn.

Environment Information

This flight simulator takes plane around Cory Island, a C-shaped piece of land named after its creator and containing everything he could fit on it in a reasonable amount of time.

The island is formed by combining several mathematical functions with the midpoint subdivision algorithm to create its very specific shape while containing randomly-generated mountains on a single heightmap. First, the midpoint subdivision algorithm is performed on the left (looking at it as a C) half of it. This is then tapered linearly down to the right half so that there are no cliffs immediately adjacent to the flat part. The distance to a circle of the desired size of the C is calculated at each point in the heightmap, and it is raised up if it is determined to be on the C or clamped to zero if it is not. It is slightly tapered if it is near the edge. Finally, a small opening is cut out to make the "O" into a "C," again, tapering it to make a smooth beach. This is the final form of the C.

Surface normals are then estimated for each grid square on the height map, and then these are averaged for each vertex, producing a smooth set of normals to be used for lighting calculations.

Extensions

  • The addition of the car and boat as well as Mr. Egghead from project 2 are extensions.
  • If the plane crashes into the ground, water, or a building, it explodes. If the car collides with a building or dives into water, it explodes. If the boat hits land, it explodes. Mr. Egghead is invulnerable.
  • When you crash, the camera goes into a special "explosion-vision" mode. Use the 1-4 keys to go back to a normal mode.
  • The car uses very simple physics to allow it to drive on sloped surfaces.
  • The boat uses even simpler controls.
  • Mr. Egghead is a simplified version of what I used for project 2.
  • The trees are simple fractals. There are simple clouds in the sky.
  • The water is animated.
  • The plane has slightly more advanced (but still oversimplified) physics than was required. It climbs less (or falls) when not oriented normally, for instance.

Known Bugs

  • Lots of collisions aren't handled, and most that are should be handled better.
  • In extreme circumstances, the car noticably clips through the ground.
  • Mr. Egghead moves faster when going uphill.
  • The trees should be randomly generated.
  • The boat should have a proper model. The airplane and car models are also very bad. The textures are bad.
  • The camera should be prevented from going inside of the ground and buildings.
  • The car can drive in the air.
  • You can see the seams in the sky box.
Last modified 12 years ago Last modified on Aug 7, 2005, 7:26:58 PM

Attachments (6)