Wed. Oct 12, 2005 (with installments on 10/3, 5, & 7)
from Friday: 1. When a
ship accidently (or not) hits another ship with a missle, the shooting
ship (team) looses 90% of its accumulated wealth, and 90% of that is
credited to the
ship (team) that was hit.
2. Four players -- two teams are required.
3. Ships also damage the net in the same way as a large rock.
4. When two ships collide, both sustain damage.
5. Missles persist for 25 time steps. 6. No friction
or speed loss except for collisions.
Introduction Develop a simple multi-player asteroids-like space game.
The system should handle two two-player teams connecting to the game
server over standard sockets (i.e., four individual connections).
The universe will consist of a 2-d plane with wrapping from top to
bottom and side to side. The universe will contain rocks,
spaceships and missles. Players control mining rigs in an
asteroid field and the goal is to accumulate wealth through gathering
small rocks. The two spaceships of a single team are tethered
together via a mining net. Rocks of a sufficiently small size
that are caught in the net are automatically collected (and disappear),
causing the team account to be increased. However, larger rocks
tear the net (pass through) and allow previously collected material
escape, thereby reducing the team's account. The net can also be
damaged by the two ships stretching it. Large rocks will also
damage a ship if hit directly. A spaceship can absorb 10 rock
hits before being destroyed. As a rock is colliding with a ship,
it turns into two rocks of half the previous size. If they are
still colliding with the spaceship, they continue to split and get
smaller until either the ship is destroyed or the rocks are small
enough to be mined. Large rocks can be reduced with missles along
the same lines. However, stray missles hitting another player
(whether on the same team or the other) cause the shooting team to be
fined by the mining federation. A missle hitting a ship counts as
one of the 10 hits. If either spaceship of a team gets destroyed
by rocks or stray missles, the team starts over in a random spot of the
The graphical display should render the objects (spaceships, rocks and
missles) that are present within a region of the universe that is
covered by a "viewport" that is centered on a player's current
position. Nets should ultimately flow behind the mining rigs
according to their movement. Each player's spaceship should be
displayed with a unique identifying characteristic. Players can
accelerate and shoot in the direction they are facing. They can
turn (rotate) left and right (without tangling the net). Missles
reduce the size of rocks when hit. A spaceship can fire a maximum
of 4 missles in a 2 second time window. The viewport
should include a running score for each player in terms of the number
of the total value of collected minerals less any fines for hitting
As one of your first steps, you should create a CVS project folder
under ~cs130exp/projects. The "projects" folder should contain
separate projects from here on out to the end of the semester. So
be sure to create sub-folders within there for any given project.
For example, you might call this project SpaceMining, and create a
folder with that name under "projects".
This project is phased into several deliverables. MONDAY (10/3): Game
server and client sending characters back and forth. Master
displays moving rocks with stationary mining rigs. WEDNESDAY (10/5): Ships
turn, fire, accelerate. Rocks split when hit. Viewport
displays other ships if they are currently located within the field of
view (both the partner ship and possible ships of the other team). FRIDAY (10/7): Viewport
shows straight-line stretchable net between ships. Small
rocks are absorbed and scores reflect collected material. WEDNESDAY (10/12): Fully
functional multi-player game. Flowing net. Destroyed
ships. Penalties and losses for shooting ships and tearing nets.