Note:
If Quartus freezes at roughly 10% completion during compilation, check the location of your project and VHDL files: storing files on a network drive (e.g., on the campus.mcgill.ca domain) instead of a local drive (e.g., C:\) will cause this issue.
# Overview
In this lab you will implement the logic behind a _Space Invaders_ game clone. If you have never played Space Invaders, we suggest taking a bit of time to play [an online version](http://www.tripletsandus.com/80s/80s_games/html5_SpaceInvaders.htm) in order to form an idea of what your final implementation should look like. Do keep in mind, however, that the version you will implement will be simplified compared to the original game.
This lab has __no instructional videos__: instead, we will expect you to use (and build atop) the knowledge you've acquired from the previous labs in order to complete the game spec.
Game Rules
----------
Our Space Invaders clone will consist of only one level. In this level, a grid of aliens will move back-and-forth across and down the screen, making their way towards the bottom. A space ship at the bottom of the screen, controlled by the player, can move left and right (based on the user's input). The ship can also fire missiles that can destroy the aliens. The game ends when either all of the aliens have been destroyed, or when the aliens reach the bottom of the screen. Furthermore, there is a scoring system that assigns 1 point to the player for every alien they destroy.
Game Requirements
------------------
Here are the game behaviors that we will be looking for during your evaluation:
- At the start of the level, the grid of aliens must begin at the top of the screen
- Aliens must move across the screen, starting from left to right (until they hit the right "wall") and then from right to left (until they hit the left "wall")
- Aliens move one row down each time they reach the edge of the screen (i.e., a "wall")
- The player's ship moves left when the left paddle button is pressed
- The player's ship moves right when the right paddle button is pressed
- The player's ship fires a missile when the missile button is pressed
- The missile moves vertically, starting from the ship's position at the moment of the missile's deployment
- If a missile collides with an alien, the alien instantaneously vaporizes (i.e., it disappears)
- If a missile collides with an alien, the player's score increases by one
- The player cannot launch another missile until the first one either: hits an alien, or misses all the aliens and hits the top "wall"
- Pressing the reset button resets the game
- The game ends if the aliens reach the bottom of the screen
- The game ends if the ship destroys all the aliens
# Instructions
This lab provides source code (see Step 1). Download and unzip the sources onto your computer. These source listings provide facilities to draw objects onto the screen. One of your tasks will be to animate these objects according to the aforementioned game logic.
Step 1
-------
Create a project and add the source files to your project. You can find the source files