Ryan Tippett
Final Project
IMPORTANT! READ BEFORE PLAYING!
Controls: The Up and Down arrow keys move the ship. The "z" key fires. For some reason, you have to click on the center of the screen (or any of the text boxes, the middle one is the largest) to activate the "z" key.
You can't move and shoot at the same time. This is a strategic feature. Honest. Do you try to shoot, or do you dodge!?
Notes (READ!): There is a rather strange error that I got when testing this. The thing that's strange is that the error won't always come up, even if the code hasn't changed. The problem appears when one of the invaders does its hit test with the ship. It only occurs with the bottommost invader. When it does occur, the rest of the game is completely unaffected. It's just that little weirdo invader. To avoid this, make sure you blast any invader you see near the bottom before it gets close to the ship's side of the screen.
For this project, I modified the second lab. Below are my modifications:
1. Rapid fire. Originally, holding down "z" would shoot a stream of bullets. Changing the event listener to listen for a "KEY_UP" instead of a "KEY_DOWN" fixed that, but I wanted to have a limit on the number that could be on screen so players couldn't just mow down the entire invading force without any effort. Using a variable called "overload" and putting a condition in the statement that fires the bullet. you can only fire three bullets at once.
2. Changed it from the top-down view to a side one (obviously). This simply involved changing some x and y coordinates for the invaders and such.
3. Scrolling background with a city theme. I mainly followed the example up on the site, but had to switch some numbers to make the background go in the opposite direction. I worry that it might be somewhat disorienting for some, now that I think about it.
4. New graphics. The invaders are the same from before (too cool looking to only use once). The boss is a palette-swapped and slightly modified regular invader. The bullet is animated, but hard to see, given the speed. Notice the little blast particles coming off of the ship when you fire a shot.
5. Added some gameplay features based on scoring. The "Kills" in the top left record how many invaders you kill. However, if an invader reaches the far side of the screen, your score will decrement your score by one. Killing an invader increments your score by one. Reaching ten kills leads to the...
6. Boss character. The boss appears after ten invaders are killed. Its appearance is heralded by a large warning sign that is typical in shoot 'em ups. When that happens, the invaders will turn tail and flee from the screen to let the boss deal with you. It will slowly emerge from the far side of the screen (I made it so that it was invincible until it got into place so you couldn't just pump it full of bullets before the fight even started).
The boss has ten HP (hit points), so you need to shoot it ten times to win. The boss moves up and down the screen for the entire fight. He won't just be dodging, though, as it will fire its own bullet at you. Obviously, that's an instant game over. Once the boss's HP gets below 5, the speed of its bullet (and thus, the frequency of its attacks) doubles.
That's it. Enjoy.