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

From WLCS
Line 16: Line 16:
 
* 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
** Optional: When you click the mouse, you can animate it hammering down
 
 
* 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 33: Line 32:
 
* 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
 +
 +
'''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
 +
*# 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

Revision as of 08:09, 24 October 2011

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
    • If the mouse is clicked AND the hammer touches the mole, then you should receive a point
  • The time should countdown and decrease by 1 every second
    • When the timer hits 0, then stop the game

Grading Rubric:

  • Images for background, hammer, and moles - 2 pts
  • Hammer sprite that follows the mouse - 2 pts
  • Moles that appear and disappear randomly - 2 pts
  • Points increase when moles are hit - 2 pts
  • Timer that counts down - 2 pts

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
    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