The purpose of this assignment is to learn more about the use of interrupts, and to write a larger 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 one I have seen but can't remember the name of. 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 an anti-aircraft turret on the ground which can shoot straight up and can move left and right. There are flying craft (airplanes, UFO's, whatever) that enter either from the left or the right at varying heights. The flying craft move directly across the screen at a fixed rate (however, they can each go at different fixed rates). The projectiles the anti-aircraft turret emits move straight up at a fixed rate as well. If a rising projectile intersects with a crossing flying craft, the craft is destroyed and the player gets points. The flying craft can also occasionally release bombs, which fall down to the surface (again, at a fixed rate). If the anti-aircraft turret is hit by (or hits) one of these bombs, it is damaged/destroyed.Here is a very crude asci drawing of what your screen might look like during play. Each "^" represents a rising projectile, the ">>>" and "<<<" are flying craft, and each "." is a falling bomb recently released by a flyer. (You do not have to use these characters, I just wanted to give you a feel for how the game might look.)
>>> ^ <<< . ^ + . / \ ----------------------
From the top down your screen should contain the following:
- Top row : Score and level
- Next 10 rows : Sky and flying craft
- Next two rows : turret
- Bottom row : ground
Here are the specifications that are required:
- Your turret must be able to move left and right - use 'h' and 'l' (or left and right arrow) keys for these movements.
- Your turret must be able to shoot projectiles - use 'k' or (up arrow) for this action.
- The projectiles must rise at a constant (relatively slow) rate once they have been fired.
- Flying craft must enter from the left and right at "random" times, and move at fixed speeds across the screen (with some moving faster than others).
- Flying craft occasionally release bombs, which fall to the surface at a constant (relatively slow) rate.
- When any part of a flying craft and a projectile intersect, the flying craft is destroyed.
- When a falling bomb intersects with the turret, the ship is destroyed (and the game ends).
Here are the options which you need to choose three or more:
- Flying craft 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 flying craft per level, and once all the flyers for a given level have either been destroyed or have made it safely across, raise the level (and therefore the difficulty). Also, let the turret take more than one bomb hit before it is destroyed.
- Make the flying craft explode when they are hit and make the turret 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 https://www.ascii-code.com/.
- Make the game work 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.