This game was inspired by the classic Whac-A-Mole game. It involves moving a hammer with keyboard keys and pressing the spacebar to attack aliens. Your score is based on the number of aliens you hit before time runs out. The game was built from scratch and applies concepts such as keyboard interrupts, timer interrupts, graphics animation, and double buffering. All the pixels you see in the game were either drawn manually or converted from images to pixels.
- Download the whac.c file
- Visit: https://cpulator.01xz.net/?sys=nios-de1soc&d_audio=48000
- Go to Settings (bottom left) and set "Memory usage warning" to 2048 MB. Then, click "Apply and Reload" (at the bottom of the settings panel).
- Return to the Settings panel and uncheck all the values in the "Debugging Checks" section.
- Upload the whac.c file and set "Language" to C.
- Click "Compile and Load."
- Click "Continue" at the top.
- Under Devices, you should see a VGA pixel buffer screen that is green, displaying the start screen of the game. You can enlarge the screen using the dropdown menu.
- Locate the "PS/2 keyboard or mouse" under Devices and start typing where it says "Type here." You can drag this panel closer to the VGA pixel buffer screen to make it easier to play the game.
- Follow the on-screen instructions, using w, a, s, d to move and space to hit.
NOTE: THE CPULATOR IS A VIRTUALIZATION TOOL FOR THE ACTUAL DE1-SOC BOARD, AND IT MAY BE LAGGY OR NOT WORK SMOOTHLY.