Nifty Asteroids
Dan Leyzberg
Yale University
Art Simon
Lowell High School
(Replace underlines with respective names.)

Asteroids, a classic arcade game, is here implemented by beginner programmers as early as their first course. The niftiest part is the relatively high production value, the final product looks like fully featured software.

Here's a demonstration.

Repitive design elements (everything is a shape, some are polygons: ships and asteroids, some are circles: stars and bullets) gives us an excellent environment to talk about class identity and inheritence decisions. Students start out with a few bare classes and build a sophisticated object heirarchy, along the way sorting out what belongs where. They are prompted to question their design decisions and create meaningful abstractions.

Topics Class identity, inheritence decisions, abstract classes, interfaces.
Audience CS1/CS2
Difficulty Easy to intermediate.
  • An enjoyable, fully-featured, lifelike product.
  • Objects are conceptualized, deconstructed, and rebuilt to practice inheritence decision making.
  • Has several distinct phases, makes it easier to plan and grade
  • A big project.
  • Wrestling with the graphics package can be frustrating.
  • Designing a whole bunch of objects can create a problem because each developmental phase is coupled with the success of the previous.
The stuff: starter code, demonstration video (same as above), and instructions.

Extra info about this assignment: