Space Invaders Javascript Assigment

From Knowledge Kitchen
Jump to navigation Jump to search

Your assignment is to make a Space Invaders-esque game using JQuery-enhanced Javascript. The game consists of:

  1. a spaceship that shoots bullets when the user clicks the mouse
  2. aliens that disappear when they are hit by a bullet

There are two levels to this assignment: basic and intermediate.

Part 1: Basic


  • 5 aliens are randomly positioned on the page
  • the spaceship is positioned at the bottom-center of the page
  • neither the spaceship nor the aliens move


  • when the user clicks the mouse anywhere on the page, a bullet is fired from the spaceship to the position of the mouse at the time it was clicked
  • if the bullet ends up at a position that is overlapping with an alien, that alien disappears

Part 2: Intermediate


Same as in Part 1 above, with an exception:

  • the aliens move about randomly about the page, but never leave the boundaries of the page


Same as in Part 1 above.

What links here