Difference between revisions of "Whac-A-Mole game"

From WLCS
 
(2 intermediate revisions by the same user not shown)
Line 11: Line 11:
  
 
'''Resources:'''
 
'''Resources:'''
* [http://en.wikipedia.org/wiki/Whac-A-Mole Whac-A-Mole Wikipedia]
+
* [http://en.wikipedia.org/wiki/Whac-A-Mole Whack-A-Mole Wikipedia]
 +
* [http://www.gamebrew.com/game/whack-mole/play Whack-A-Mole Game]
  
 
'''Requirements:'''
 
'''Requirements:'''
 
* A background that has at least 9 different holes/slot
 
* A background that has at least 9 different holes/slot
 
* The player sprite will be a floating hammer that follows the mouse
 
* 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)
 
* You will have 9 "moles" on the screen (they can be different if you want)
 
** Moles should appear and disappear at random times repeatedly
 
** Moles should appear and disappear at random times repeatedly
Line 22: Line 24:
 
** Points should be reset to 0 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 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
 
** 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
 
* The time should countdown and decrease by 1 every second
 
** When the timer hits 0, then stop the game
 
** 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:'''
 
'''Grading Rubric:'''
* Images for background, hammer, and moles - 2 pts
+
* Images for background, hammer, and moles - 1 pt
* Hammer sprite that follows the mouse - 2 pts
+
* Hammer sprite that follows the mouse - 1 pt
 
* Moles that appear and disappear randomly - 2 pts
 
* Moles that appear and disappear randomly - 2 pts
 
* Points increase when moles are hit - 2 pts
 
* Points increase when moles are hit - 2 pts
 
* Timer that counts down - 2 pts
 
* Timer that counts down - 2 pts
 +
* Sounds - 2 pts
  
 
'''Advanced Features (Optional):'''
 
'''Advanced Features (Optional):'''
* 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
 
* When you click the mouse, you can animate it hammering down
 
* Animate the moles, such that when they are hit...they make a damaged faced
 
 
* Turn the game into a 2 player game
 
* 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 1 to go first and rack up as many Player 1 points as he/she can

Latest revision as of 09:10, 23 May 2013

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
    1. Allow Player 1 to go first and rack up as many Player 1 points as he/she can
    2. Allow Player 2 to go after and rack up as many Player 2 points as he/she can
    3. Compare the 2 point values and announce the winner or a tie
    4. 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