Assignment 1 – Asteroids

Maximum Points = 50

 The purpose of this lab is to review your study of computer programming and algorithms from CS 1. In this lab you will write a program that might be included as part of the Asteroids game (http://www.djgallagher.com/games/classics/asteroids/game_flash.php).

 

Design and implement a class that represents a spaceship. The spaceship can be drawn (side view) in the two horizontal or two vertical directions. When the left arrow key is pressed, turn the spaceship to the left. When the right arrow key is pressed, turn the spaceship to the right. When the space key is pressed, have a laser beam shoot out of the front of the spaceship.

 

Do one or more of the following extra features:

a)    Provide a title screen

b)    Add a star field in the background

c)    Change the background color when the laser shoots

d)    Add more than the four directions for the spaceship

e)    Add a collection of asteroids moving around the screen

a.    Allow your spaceship to shoot down the asteroids

b.    Allow the asteroids to destroy your spaceship

f)     Assign the up arrow key the function to move the spaceship forward

g)    Add “alien” spaceships that shoot at you

h)   Keep score

i)     Control the spaceship with the mouse instead of the keyboard

j)     Anything else that you think might enhance this assignment (check with me first)

 

 (Due before class on Thursday, January 29, 2009) Submit your .java files containing your program to the dropbox in WebCT.

 Grades are determined using the following scale:

Grading Rubric  (Word document)