Whac-A-Mole game
From WLCS
Objective:
- Design and implement a game where a player must whack moles that randomly pop up
Competencies:
- 053 Write a program that uses variables and constants.
- 057 Write a program that uses conditional structures.
- 058 Write a program that uses looping structures.
- 061 Code a program to display graphics.
- 063 Code a program to animate objects.
- and more...
Resources:
Requirements:
- A background that has at least 9 different holes/slot
- The player sprite will be a floating hammer that follows the mouse
- You will have 9 "moles" on the screen (they can be different if you want)
- Moles should appear and disappear at random times repeatedly
- You will have 2 different variables: time and points
- Time should be reset to 10 at the beginning of the game
- Points should be reset to 0 at the beginning of the game
- When a mole is visible, the player should try to click on the mole
- When you click the mouse, you can animate it hammering down
- If the mouse is clicked AND the hammer touches the mole, then you should receive a point
- Animate the moles, such that when they are hit...they make a damaged faced
- The time should countdown and decrease by 1 every second
- When the timer hits 0, then stop the game
- Sounds
- Add background music when the game plays
- Add a sound effect whenever the hammer is swung
- Add a sound effect when a mole gets hit
Grading Rubric:
- Images for background, hammer, and moles - 1 pt
- Hammer sprite that follows the mouse - 1 pt
- Moles that appear and disappear randomly - 2 pts
- Points increase when moles are hit - 2 pts
- Timer that counts down - 2 pts
- Sounds - 2 pts
Advanced Features (Optional):
- Turn the game into a 2 player game
- Allow Player 1 to go first and rack up as many Player 1 points as he/she can
- Allow Player 2 to go after and rack up as many Player 2 points as he/she can
- Compare the 2 point values and announce the winner or a tie
- Hint: You will need 2 different variables for 2 different scores.
- If you hit enough moles, you can create a bonus round for the player. During this bonus round, the player may be asked to do something random, like whack flying moles that are bouncing around the screen