Painfully coded in assembly. For
CS 447 - Computer Organization and Assembly at Pitt.
Instructions to View
- Download MARS, a MIPS emulator here.
- Download this repo, and open
- Click the Wrench to assemble
Tools > Keypad and LED Display Simulator
Connect to MIPS
- You should see a start screen
There is a start screen. You press B to start. There are rounds. Game starts when you click a key. When you defeat all the enemies, you go to the next round.
Overview of How Game Works
There is a
sequence_no variable. Each number corresponds to a different game screen.
- Sequence 0: Game Start screen
- Sequence 1: Current Round screen
- Sequence 2: Actual game, paused
- Sequence 3: Actual game, in play
- Sequence 4: Game Over
In the main loop, a function is called to show the current sequence. This function basically looks at that variable and determines what things to draw based on this.
regular_game_functions function contains all of the calls for the gameplay (update player,
update enemies, move bullets, draw things, etc).
There is one way for a player to advance to the next round
- Kill all enemies
There are two ways for a player to die and go to the game over screen:
- Lose all lives
- Run out of bullets
EXTRA CREDIT I DID:
 Game intro and game over screens.
 Difficulty scaling. After winning each round, the enemies shoot faster and move faster. Chance of power-ups is increased. And each round you get 20 more bullets.
A score is also determined based on round number, enemies killed, and bullets left
Each enemy killed is worth the round number they were killed on. So if you beat Round 2, you have at least 60 points (20 for enemies killed in Round 1, 40 for Round 2).
Each bullet left after 20 for each round is a point
[?] Visual polish. Made the intro screen and game over screen look kinda nice. A ship explosion animation is included. Powerups have different sprites. Not sure how much this counts for.
 Powerups. Powerups have a random chance of showing up. In the
CHANCES_POWERUP_SHOWSdetermine these chances. Every
POWER_UP_FRAME_TIMINGframes, there is a 1 in
CHANCES_POWERUP_SHOWSchance that a powerup shows. The powerup pops up on the side opposite of the player.
To test them out, you can go to
powerups.asm file, and change the
to 1. This will make a powerup show every second. In the same file, in the
you can force a powerup to always show by setting
a0 to the powerup you want.
Here is a list of the powerups, and a description.