Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fly around and blast through asteroids in this OpenGL C++ game
C C++ Objective-C Shell CSS FORTRAN Other
Branch: master
Failed to load latest commit information.
animations Initial Commit
audio Initial Commit
eigen2 Initial Commit
freeimage Initial Commit
games Initial Commit
geometry Initial Commit
kdtree Initial Commit
levels Meshes for balls, bombs, and missiles are now only loaded once. Explo…
soil Initial Commit
textures Initial Commit
.gitignore Updated to final submission
LICENSE Create LICENSE
README Added binary
SOIL.lib Initial Commit
activemodel.cpp Initial Commit
activemodel.h Initial Commit
asteroid.cpp Updated to final submission
asteroid.h Updated to final submission
ball.cpp Meshes for balls, bombs, and missiles are now only loaded once. Explo…
ball.h Meshes for balls, bombs, and missiles are now only loaded once. Explo…
boundingbox.cpp Initial Commit
boundingbox.h Initial Commit
boundingshape.h Initial Commit
boundingsphere.cpp Initial Commit
boundingsphere.h Initial Commit
boundingspheres.cpp Free'd a bunch of memory
boundingspheres.h Initial Commit
box.cpp Initial Commit
box.h Initial Commit
crosshair.cpp Initial Commit
crosshair.h Initial Commit
enemy.h Initial Commit
envmodel.cpp Initial Commit
envmodel.h Initial Commit
explosion.cpp Free'd a bunch of memory
explosion.h Initial Commit
force.cpp Initial Commit
force.h Initial Commit
game.cpp Free'd a bunch of memory
game.h Initial Commit
geometry.h Initial Commit
intersection.cpp Initial Commit
kamikaze.cpp Initial Commit
kamikaze.h Initial Commit
level.cpp Free'd a bunch of memory
level.h Meshes for balls, bombs, and missiles are now only loaded once. Explo…
log.cpp Initial Commit
log.h Initial Commit
main.cpp Free'd a bunch of memory
main.h Free'd a bunch of memory
makefile Free'd a bunch of memory
model.h Free'd a bunch of memory
objgeometry.cpp Free'd a bunch of memory
objgeometry.h Free'd a bunch of memory
parser.cpp Meshes for balls, bombs, and missiles are now only loaded once. Explo…
parser.h Initial Commit
passivemodel.cpp Initial Commit
passivemodel.h Initial Commit
plane.cpp Initial Commit
plane.h Initial Commit
processOBJ.py Initial Commit
projectile.cpp Free'd a bunch of memory
projectile.h Free'd a bunch of memory
ship.cpp Updated to final submission
ship.h Initial Commit
shipgeometry.cpp Initial Commit
shipgeometry.h Initial Commit
teapot.cpp Initial Commit
teapot.h Initial Commit
trace.log Free'd a bunch of memory
turret.cpp Initial Commit
turret.h Initial Commit
utilities.cpp Initial Commit
wall.cpp Initial Commit
wall.h Initial Commit

README

  _________ __              ___________.__       .__     __                
 /   _____//  |______ ______\_   _____/|__| ____ |  |___/  |_  ___________ 
 \_____  \\   __\__  \\_  __ \    __)  |  |/ ___\|  |  \   __\/ __ \_  __ \
 /        \|  |  / __ \|  | \/     \   |  / /_/  >   Y  \  | \  ___/|  | \/
/_______  /|__| (____  /__|  \___  /   |__\___  /|___|  /__|  \___  >__|   
        \/           \/          \/      /_____/      \/          \/       

Group:
  Long Cheng        cs184-cy
  Kyle Conroy       cs184-cz
  Jillian Moore     cs184-cx
  Wei Yeh           cs184-df

Platform:
    Mac OS X 10.6 - Snow Leopard
    
Submitted by:
    Wei Yeh
    
Website:
    http://www.kyleconroy.com/starfighter.php

    
#####################
# Compilation
#####################

Use "make"; resulting executable is named "starfighter"


#####################
# Usage
#####################

./starfighter -f <levelListFile>


#####################
# Input File Spec
#####################

The input file is a level list with pairs

<level> highScore

separated by newlines. <level>.level refers to the level file in the same directory.

A level file consists of geometry definitions and model definitions.

#####################
# Level File Spec
#####################

Some entries have options [option1 | option2]

# Loading a .obj mesh

{
    objgeometry                 #
    name unique-name            # must be a unique name
    path path/to/file           # relative path
    bs [box | sphere]           # OPTIONAL sets the bounding shape, default is box
    boundingsphere x y z r      # OPTIONAL explicitly sets the bounding sphere 
    boundingsphere x y z x y z  # OPTIONAL explicitly sets the bounding box
}


#####################
# Gameplay
#####################

The objective of StarFighter is to fly and blast through asteroids
and alien spacecrafts, making it to the end of the level with a high score.
The ship is controlled entirely with the mouse. Lasers are fired by clicking
the mouse button. The ship can also launch bombs by holding down the mouse
button and releasing it after at least half a second. The longer the mouse button
is held down, the further the bomb travels. Bombs are detonated by pressing the space bar.


#####################
# Features
#####################

* animation and UI using OpenGL and GLUT
* detailed collision detection, optimized using object-aligned bounding boxes/spheres and kd-trees
* ray tracing technique used to fire lasers/missiles
* gravity-affected, bounce-able projectile simulation with balls
* mouse controlled x/y thrust
* level input file parsing to construct world, using OBJ output of objects designed in Maya


#####################
# Libraries Used
#####################

* Eigen vector/matrix library
* kdtree (http://code.google.com/p/kdtree/)
* FreeImage for writing images
* SOIL (Simple OpenGL Image Library) for texture input


#####################
# Other Credits
#####################

* Ship and Kamakazi model from sender pinarci, on TurboSquid
    * http://www.turbosquid.com/3d-models/sendercorp-sender-ma-free/429728
    * http://www.turbosquid.com/FullPreview/Index.cfm/ID/433482
* Asteroid models from Setro on turbo squid
    * http://www.turbosquid.com/3d-models/free-3ds-model-stones/497091
* Sound effects from http://freesound.org

#####################
# License
#####################

Copyright (c) 2009 Long Cheng, Kyle Conroy, Jillian Moore, Wei Yeh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Something went wrong with that request. Please try again.