ICT215 Computer Graphics Principles and Programming, Semester 1, 2007 Project

Details:

Student Name 1: Chris Boichel

Student Name 2: Jesse Kremer

Project Name: Paradise Island Adventure Flight Simulator Deluxe

Proposition: To make an arcade style flying game with physics and animation.

Please Note: As we are only learning there are some things we have done wrong without realising and as a result the game is a little power hungry. In order to run smoothly it requires some sort of GPU (its tested and runs fine on an nVidia 7800GT but runs poorly on the lab computers). Without the GPU the textures behave oddly and the game runs slowly. If the testing machine has no GPU you can press “g” to disable trees and get a significant speed increase, “G” turns them back on.

Pre Production:

Concept Sketches:

Design:

Introduction:

We wanted to make a flying game which is time based where you fly through checkpoints to try get the fastest time. To implement an element of physics, we put in an explosion with simple particles. We also tried to animate the plane as realistically as possible. Also we wanted to put in some collision detection on buildings and the ground.

Physics Aspects:

We applied physics to the particles when a collision is detected. The particles are given a random initial velocity (so particles shoot off in all directions) within a range starting from the collision point. The formula used for the x and z elements is:

[s = ut] because it is a constant velocity in those directions.

for the y element the formula is:

[s = ut + at2/2] where acceleration is the gravity, except we use - at2/2 because gravity acts downwards.

This gives the distance travelled which is added to each particles position for each frame until the life of the particle goes below zero.

particle[i].velocity.y -= ((GRAVITY * 0.01) * (pow(time, 2)))/2;

particle[i].pos.x += particle[i].velocity.x * time;

particle[i].pos.y += particle[i].velocity.y * time;

particle[i].pos.z += particle[i].velocity.z * time;

particle[i].life -= time;

Animation Aspects:

We animated two objects within the game, both relating to the plane. The first is just a simple way of making the propeller appear to spin. There are two functions that draw the propellers at different positions as shown in the diagrams; a counter makes them alternate at regular intervals.

The plane can also rotate on the z axis for turning so it appears to bank and on the x axis for climbing/descent. So when the user turns the plane, it will bank slowly to a maximum amount (almost 90º for left and right, and around 45º for up and down).

Interactivity Aspects:

The user can interact with the game using the keyboard. The mouse is only used at the end to click through the exit message. The up, down, left and right keys can be held down while the other keys used have to be pressed each time, such as the throttle up and throttle down keys. The Heads Up Display is used to provide the user with information to help them guide the plane and judge their time.

User Guide:

Other Keys:

g - remove trees

G - show trees

Known Bugs:

There is a bug in the game that when you crash, it sets a number of the checkpoints as passed when they haven’t been. I think this has something to do with the memory addresses of the global variables being affected by other functions, I haven’t been able to fix it but the next game we make will have far fewer globals because they are trouble!