Homework 6 Information, ECS50 Fall 2000
- All parts of the assignment are due on Thursday, November 30th
- Post any questions on the specifications to the newsgroup
- Any changes will also be posted to the newsgroup
Assignment:
SubHunt
The purpose of this assignment is to learn more about the use of interrupts,
and to write a large program in assembly language. Both are skills that can
come in handy in the future. In order to develop these skills, you are going
to design a game similar to the Palm Pilot game "Subhunt". There are
specifications which everyone's games must follow, and a list of options of
which you must complete (3). You can complete additional options for extra
credit.
Game Description:
In this game, there is a ship on the surface of a body of water which can move
left and right. There are also submarines that enter either from the left
or the right at varying depths. The submarines move directly across the screen
at a fixed rate. The ship is able to drop depth charges from either the left
or right end of the ship, and these depth charges sink down into the water at a
fixed rate as well. If a sinking depth charge strikes a crossing submarine,
the submarine is destroyed and the player gets points. The submarines can also
occasionally release floating mines, which drift up to the surface. If the
ship hits (or is hit by) one of these mines, it is damaged/destroyed.
Here is a very crude asci drawing of what your screen might look like during
play. Each "." represents a sinking depth charge, the "*****" are submarines,
and each "^" is a rising mine recently released by a submarine. (You do not
have to use these characters, I just wanted to give you a feel for how the game
looks.)
__+++__
\___/
----------------------------------
.
. *****
^
^ . ^
*****
^
^
*****
From the top down your screen should contain the following:
- Top row : Score and level
- Next two rows : Ship
- Next row : Surface of water
- Next 10 rows : Underwater realm
- (Note - you can make a 3-row ship if you want ...)
Here are the specifications that are required:
- Your ship must be able to move left and right - use 'h' and 'l' for these
movements.
- Your ship must be able to drop depth charges off of the left and right
sides - use 'k' and 'l' for these actions.
- The depth charges must sink at a constant (relatively slow) rate once they
have been released.
- Submarines must enter from the left and right at "random" times, and move
at fixed speeds across the screen (with some moving faster than others).
- Submarines occasionally release mines, which float to the surface at a
constant (relatively slow) rate.
- When any part of a submarine and a sinking depth charge intersect, the
submarine is destroyed.
- When a rising mine intersects with the ship, the ship is destroyed (and
the game ends).
Here are the options which you need to choose three or more:
- Submarines are worth different amounts of points, with the ones going
faster being worth more (because they are harder to hit).
- Have a fixed number of submarines per level, and once all the subs for a
given level have either been destroyed or have made it safely across, raise the
level (and therefore the difficulty). Also, let the ship take more than one
mine hit before it is destroyed.
- Make the submarines explode when they are hit and make the ship explode
when it dies (visual effects - you know, eye candy!).
- Use the extended ASCII character set to make the "graphics" look better.
You can find the character set at
http://telecom.tbi.net/asc-ibm.html.
- The game works like an Atari game - no input is prompted for, the game is
turned on and the screen appears. The (r) reset can be pressed at anytime to
reset the game to the beginning. The first few levels can be started from by
using the (a) to decrease the level and (z) the increase the level. The player
should see what level they are on while doing this. The (o) is the off button
and it will "turn off" the machine. The (s) will start the game. Pressing (s)
during the game will not reset it. This sounds like a lot, but once you do one,
the rest should be very similar.
- Use the tape drive to keep a high score file. Pressing (h) before the
game is started or after it is ended should display the scores. If a game
finishes and the score is in the top scores, get the player's initials and add
the scores and initials to the high scores. The high score should also be
displayed during the game on the top line. If the player breaks the high score
during the game, it should show their score as the high score.
- Think of your own option and check if it will be okay.