CPE 471 Final Project

Home Run!

By Phyllis Douglas & Alex Haggblade

Screenshot of Game Play

Overview

Home Run is a game in which you are a baseball barreling through the sky via a home run. Avoid obstacles in the sky to get as much distance as you can from Earth!

Controls

* Mouse Move: Moves the Baseball
* 'q': Quit Game at Any Time
* 'p': Pause Game

User Instructions

Start Screen

Start Screen
Left click anywhere on the screen to begin.

Game Play Example

Game Play
Use the mouse to move the baseball. At the top center of the game, there's your "score" in terms of miles. Avoid the things flying at you to get the greatest height! (Clouds you can pass through.)

Pause Screen

Pause Screen
Press 'p' if you want to pause the game, and to unpause, press 'p' again. You can view the spawn rate percentage on the pause screen.

Game Over!

Game Over
Your end score will be displayed. Left click on the screen to play again!

Resources

Cal Poly CPE471 Home Page
Various source code provided by Zoe Wood.
Cloud Texture
Used for the background of the sky.
Baseball Texture
Although there's a .obj file for download as well, we used the gluSphere() function to create the baseball.
The texture for the cloud "enemies" was created by Phyllis Douglas.
Big C++ by Cay Horstmann and Timothy Budd
Reference text.

Tools
The NetBeans IDE along with Dropbox and Subversion in combination were used to make this program.

Additional Information

Models
All models (baseball, birds, planes, and clouds) were created using glu and glut shape primitives. The baseball, birds, and planes were rendered with the same vertex and fragment shaders, but the clouds were created by taking the alpha values of the cloud texture in order to render them. Thus, they use a different vertex and fragment shader. All models except for clouds are animated.

Text
All text was created with the glutStrokeCharacter() library function. The font type is "Roman." Only the Game Over screen is animated.

Lighting
The scene is lit using the Phong shading model.

Source Code

Source Code (Linux Only, .zip)

To Compile:
Make sure that you have GLU and GLUT installed on your system before trying to compile the code. Also, make sure that your OpenGL version is 3+.

Type "make" in the directory where you unzipped the files to. After, type "./a.out" and enjoy playing Home Run!