Project - Asteroids

The game of Asteroids is a classic arcade game from back in the 80s... and it's about to make a comeback in this new version, written by you for playing on your computer.

This project is based on the work done by Computer Science teacher Art Simon at Lowell High School in San Francisco. Mr. Simon has shared his work under a Creative Commons Attribution 4.0 International License.

This project derives from his. Let's get started!

The Game of Asteroids

The game of Asteroids is a game that was put out by Atari in the late 1970s. You can read all about it on Wikipedia, but this is the general idea:

  1. You control a spaceship that can turn, accelerate, and fire (missiles?) into space.
  2. There are a bunch of asteroids floating around in space, and if any of them run into you, you die.
  3. If you shoot a big asteroid, it breaks up into smaller asteroids. If you you shoot the smaller asteroids, they disappear. You get points for shooting asteroids.
  4. If you clear the whole screen, a new set of asteroids appears (more of them? or moving faster?) and the game continues.
  5. At higher levels in the game, flying saucers appear. They move faster than the asteroids and also shoot. If one of their missiles hits you, you die.
  6. You have three lives, and earn an extra life at some point in the game.
  7. One additional option you have in your spaceship is a "hyperspace" button that will teleport you instantly to a random point in space. If you accidentally transport into an asteroid, however, you die.
The game of Asteroids, with the ship in the middle, an asteroid just southeast of the ship having just been shot, and other larger asteroids floating around.

Although the original Asteroids game was "hardwired" into the videogame cabinet, we'll be writing a series of classes, implemented using the Processing platform, to recreate this game.

A fairly faithful reproduction of this game is available online. You can use it as a reference as you're trying to duplicate the play experience in your own game!

When you're ready to proceed, continue on to Part 1 below.

Development Process

  1. Part 1 - Set up your project folder
  2. Part 2 - The Floater superclass
  3. Part 3 - The Spaceship moves
  4. Part 4 - Make some Asteroid objects
  5. Part 5 - Shoot the Asteroids
  6. Part 6 - Multiple lives; Keeping score; Levels
  7. Part 7 - Additional possibilities