Homework 2: Space Invaders Tribute

Short Description:

Write a program that behaves something like Space Invaders

Goals

When you finish this homework, you should have written a javascript program that

Formal Description

The game Space Invaders features a block of aliens who are attempting to capture the planet and a defender who is attempting to shoot them down. The player takes on the role of the defender. Between the defender and the aliens are four shields, which provide some level of cover until they are destroyed.

Your goal is to write a tribute game using only a modified version of my canvas. You must modify the canvas only as described below. You may not use any other graphics primitives.

The defender can move across the bottom of the screen either left or right. They can fire their gun at the aliens or the shields, but they may only have one active shot at a time. The shot travels straight up until it hits something or reaches the top of the screen. If the shot hits an alien, the alien is eliminated. If the shot hits a shield, part of the shield is destroyed. Once the shot is finished the player can shoot again. These shots were visualized as a short line segments traveling up.

There is a bank of 11×5 aliens (five rows of eleven evenly, spaced) that start at the top left of the screen. These aliens travel as a block back and forth across the screen, dropping down a fixed amount each time they reach an edge. If an entire outside column of aliens is eliminated, the next column becomes the edge and they will travel further. Each time an alien is eliminated, the remaining aliens speed up by a fixed amount. The aliens have two sprites, which they switch between each time they moved.

The bottom most alien for each column can fire a shot at the player or at the shields. These shots appear to be fired somewhat at random, and should be limited to at most 4 active shots at any time. If the shot hits a shield, a portion of the shield is destroyed. If the shot hits the defender, the defender is destroyed. In the arcade game, the player had three lives.

The shields appear to be made up of a set of blocks. For our game, make the shields a 4×3 array of blocks, with a block destroyed when it is hit. A shield block is also destroyed if an alien comes into contact with it.

I used this video for my description, however you might gain some insight, or at least entertainment from this clip as well.

  • For this game you should: There are a total of 40 points available for this homework. You can score a maximum of 50 points. Any "extra" points will be included in your homework score and calculated in your final average.

    Please do not make a complete reproduction of Space Invaders, please do not title your project Space Invaders. This is a tribute so please incorporate some differences. We are not interested in any copyright infringement. Also, please note on your page that this is a "Tribute to Space Invaders"

    Documentation

    Please make an intro page for this assignment that Please use relative references to your code in the html file. This will allow me to extract the file in my local environment.

    Additional Requirements/Comments

    Extras

    I find that I want to continue to play with simulations/visualizations of this type. Please do so, but only if you have sufficient time, do not enhance this, or any other project at the expense of your other classes.

    Submission

    When you have finished your assignment, please submit a tar or zip file containing all files needed for this project.

    Submit your file to the D2L homework folder homework 2 by the due date.