"The project was a culmination of all the Python knowledge acquired in the “Introduction to Interactive Programing in Python“class.  The implementation was successful and passed all the required tests.”

Project Portfolio:
  Asteroids Like Game Project

Challenge

Asteroids, one of the first major hits of the golden age of arcade games, is a game where the player flies a space ship in an asteroid field.  The object of the game is to not collide with the asteroids while at the same time shooting down the asteroids and the enemy space ships. 


The challenge of this project was to replicate an updated version of Asteroids called RiceRocks using the programming language Python.  The Python game will have to simulate many key aspects of the arcade version.  It will have multiple asteroids flying around, it will have space ships that will shoot multiple missiles and if your space ship collides with an asteroid the space ship will be destroyed.  The game will keep track of the score and of the lives remaining and the game will end at the proper time.


This project was a project for the Rice University Computer Science class “Introduction to Interactive Programing in Python”, offered through Coursera, an online education site.  The class is part of a series of classes designed to develop an understanding of computing fundamentals.

Solution

I have not posted the Python code solution online.  To take this class and do the project I signed an honor code agreement that stated the actual code would not be shared publicly.  A foundation framework was already in place that took care of the environment to display the graphics and the window on which the game would be played.


Some of the solutions/features developed to implement the Python version of the Asteroids game included:

  • The program spawns multiple rocks.
  • The program correctly determines whether the ship collides with a rock.
  • The program removes a rock when the ship collides with a rock.
  • The number of lives decreases by one when the ship collides with a rock.
  • The program spawns multiple missiles.
  • The program plays the firing sound when each missile is spawned.
  • The program removes a missile that does not collide with a rock after some fixed time period.
  • The program correctly determines whether a missile and a rock collide.
  • The program removes missiles and rocks that collide.
  • The score is updated appropriately after missile/rock collisions.
  • When the lives go to zero, the splash screen reappears and all rocks are removed.
  • When the splash screen is clicked, the lives are reset to 3, score is reset to zero and the background music restarts.
  • The game spawns rocks only when the splash screen is not visible and a game is in progress.

Results

Developing RiceRocks, the updated Asteroid game, using Python, was a real challenging project.  The project was a culmination of all the Python knowledge acquired in the “Introduction to Interactive Programing in Python“class.  The implementation was successful and passed all the required tests.  This class is offered through Coursera, an online education site.  The class is part of a series of classes designed to develop an understanding of computing fundamentals.