Project
Proposal
-
Abstract
-
Basic Project Details
-
Proposed
Extensions to Basic Project
-
Example Project
Work Breakdown
-
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:
-
Frame containing playing surface. Objects reaching the edge
of the frame bounce.
-
Sun in center of frame that provides gravity and that destroys
ships that venture too close. The sun cannot be destroyed.
-
Two ships that destroy each other in the following ways:
-
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.
-
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.
-
Direct collision.
-
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.
-
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.
-
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.
-
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
-
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:
-
Networked two-player version. Each player would have his
or her own screen, keyboard, and mouse.
-
As above, but allowing for more than two players.
-
Limited numbers of missiles and mines per ship.
-
Limited amount of fuel in ships and/or missiles.
-
Automated scorekeeping.
-
Change in acceleration based on mass remaining as fuel, missiles,
and mines are consumed.
-
Additional types of weapons, such as short-range lasers/phasers.
-
Objects "wrap around" rather than bouncing when reaching
the edge of the frame.
-
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.
-
Planets that act as "bases", replenishing their ship if it
orbits (and destroying the opposing ship(s) if it ventures too close).
-
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.
-
User input and network communication (Controller, more or
less).
-
Display (View).
-
Physical object interaction, including gravity, collisions,
and movement (part of Model).
-
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.