De1-SoC implementation of the popular Human Benchmark Memory Game (https://humanbenchmark.com/tests/memory).
De1-SoC FPGA interfacing to use I/O devices (PS/2 Keyboard, VGA display, Audio Speakers), C Programming
ECE243 Report: “Human Benchmark: Memory Game”
What is our project? Our project tests the memory capabilities of the user by showing a random number of white squares on a grid for ~5 seconds on the VGA, then hides these squares and allows the user to use PS/2 keyboard to traverse the grid in order to select the squares that originally were flashed white. Each level gives the user 3 chances to select an incorrect square, after 3 chances are used up on the level a life is deducted and a new set of white squares are flashed for the level. Once your lives reach 0, the game is now over.
Detailed Walkthrough:
Preliminary: Obtain the source code, compile and run it. *Please ensure the PS/2 keyboard, VGA display, and speakers are connected.
Controls: Use WASD to move and ENTER to submit. *Using WASD will make a lower pitch beep, and pressing enter will make a high pitch beep.
- At this point, you should see a difficulty selection menu (see Figure 1). Use “A” and “D” keys to move through the menu and press enter on the difficulty you wish to start at: we suggest you start with easy.
*The only difference between easy, medium and hard is the starting grid size: Easy - 3x3, Medium - 4x4, Hard - 5x5
Figure 1. Difficulty selection menu
- After selecting a difficulty, you should see a grid with certain squares in white (see Figure 2). These are the squares you need to remember, they will only be shown for 5 seconds before disappearing. Couple things to note, you have 3 chances per level, and 3 lives per game. These are indicated top-right of the screen.
Figure 2. White squares shown for Level 1 Easy Mode.
- Now in the selection phase, you will see a crosshair serving as the cursor. You can move this cursor by using WASD, and can select a square you think was white by pressing enter. If you select correctly, the white square will be revealed. However, if you select incorrectly, you will lose a chance. See Figure 3 below. Note, selecting an already picked white square will not result in a penalty, but selecting the same incorrect square again will result in a deduction of your chances.
Figure 3. Selecting an incorrect square (left). Selecting the correct square (right).
-
After selecting all the correct squares you will progress to the next level. However, if you use up all your chances without selecting all the white squares. The level will restart with a different pattern of white squares; you will also lose 1 life.
-
Higher levels will have a larger grid and more squares to remember, Figure 4 shows Level 3.
Figure 4. Level 3 on Easy Mode.
- After losing all your lives you will see a “GAME OVER” screen, see Figure 5. Here, you can press enter to restart back at the difficulty menu selection.
