Project Proposal
  1. Abstract
  2. Basic Project Details
  3. Proposed Extensions to Basic Project
  4. Example Project Work Breakdown
  5. Language


Abstract

We propose to develop a Spacewar game. This game will include a Sun in the middle of the screen that provides gravity and at least two mobile player-controlled spaceships that can fire missiles and drop mines. The object of the game is to destroy the other player’s spaceship. Additional features will be added depending on the desires and talents of other members of the project. See below for possible additional features.

This project has three objects: (1) compare the time required to develop this Java program with that required to develop a very similar program in PDP-12 assembler, (2) demonstrate students’ ability to design and program an object-oriented simulation, and (3) produce a fun game.

Basic Project Details

The basic project consists of the following:

  1. Frame containing playing surface. Objects reaching the edge of the frame bounce.
  2. Sun in center of frame that provides gravity and that destroys ships that venture too close. The sun cannot be destroyed.
  3. Two ships that destroy each other in the following ways:
    1. Firing a missile that is manually detonated. If detonated sufficiently close to a ship, missile, or mine, both the detonating missile and the other object will explode and be destroyed.
    2. Dropping a mine, this automatically detonates as soon as it gets close enough to another ship, missile, or mine. The mine automatically arms itself as soon as it reaches a safe distance from the ship that drops it.
    3. Direct collision.
    4. Exploding close enough to the other ship.
    Each ship can in addition fire its rocket to accelerate, and can rotate itself either clockwise or counter-clockwise.
  4. Missile. Only one of these may be in flight from a given ship at a given time. They are manually fired, and manually detonated. When detonated, they destroy any nearby object (other than the sun). If they hit a ship without being detonated, the missile is silently destroyed—the ships are assumed to automatically disarm/destroy missiles that venture too closely.
  5. Mine. There may be up to ten of these in flight at a given time. They are manually dropped. Once they get far enough from the ship that dropped them, they automatically arm themselves. Once armed, they will detonate upon getting close enough to any object, including the ship that dropped them.
  6. User input. One player will control his/her ship with the keyboard, the other with the mouse. There will be suitable penalties for removing focus from the frame. J
  7. Conceptual "underlying universe" objects mediate physical interactions (gravity, proximity, etc.).
A player wins when his ship is the sole surviving ship.

The development time, accuracy, and execution speed of this program will be compared to that of a similar PDP-12 program written in 1977 (~150 man-hours from a pair of students, 3,000 lines of assembler, crude simulation of gravity (significant orbital precession due to round-off error), and sub-reflex (10-20 Hz) update rate). This PDP-12 program was in turn inspired by a similar program developed at MIT.

Proposed Extensions to Basic Project

Actual extensions will be selected based on the desires and capabilities of other team members. Some possibilities include:

  1. Networked two-player version. Each player would have his or her own screen, keyboard, and mouse.
  2. As above, but allowing for more than two players.
  3. Limited numbers of missiles and mines per ship.
  4. Limited amount of fuel in ships and/or missiles.
  5. Automated scorekeeping.
  6. Change in acceleration based on mass remaining as fuel, missiles, and mines are consumed.
  7. Additional types of weapons, such as short-range lasers/phasers.
  8. Objects "wrap around" rather than bouncing when reaching the edge of the frame.
  9. Objects simply pass out of view when reaching the edge of the frame. "Scroll" the frame to keep the ship in view, and have some sort of indicator for the direction to the sun and to the opposing ships.
  10. Planets that act as "bases", replenishing their ship if it orbits (and destroying the opposing ship(s) if it ventures too close).
  11. Two suns (or more) orbiting each other.
See the implementation section for a list of the extensions that were actually implemented.

Example Project Work Breakdown

This is just an example—design time (e.g., CRC exercise) would be needed to determine the classes and methods, and implementation could then be distributed among the group members.

  1. User input and network communication (Controller, more or less).
  2. Display (View).
  3. Physical object interaction, including gravity, collisions, and movement (part of Model).
  4. Physical objects themselves, including creation of additional physical objects (firing missiles, laying mines), thrust, orientation, and mass (the other part of Model).
Language

The language chosen for this project is Java.