1 / 7

Whack-A-Camper

Whack-A-Camper. Project Description. This game is loosely based on the Whack-A-Mole arcade game. Each game starts with 45 seconds of play. Moles randomly pop out of holes on the landscape and the player tries to whack them.

pahana
Download Presentation

Whack-A-Camper

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Whack-A-Camper

  2. Project Description This game is loosely based on the Whack-A-Mole arcade game. • Each game starts with 45 seconds of play. • Moles randomly pop out of holes on the landscape and the player tries to whack them. • Use the mouse to move the hammer and the space bar to swing the hammer. • If the player scores more than 30 points then the winning message is broadcast. If not, the losing message is broadcast.

  3. Sprites • Paint or import a stage with holes for the sprite to pop out. • Create a hammer sprite. • Create amole sprite for each hole and place one over each hole.

  4. Add Variables • Create a new variable called “score” • Create a new variable called “time” • When the green flag is clicked: • Set score to 0 • Set time to 45 • Create a loop which decreases time by one. Add a small delay for the countdown. Repeat the loop 45 times. • Add sound to indicate that time is up.

  5. Hammer Movement • Add script to the hammer sprite so that it moves with the mouse. Use a loop. • Hint: use • Add script to the hammer sprite so when the space key is pressed the hammer swings. • Hint: Instead of changing costumes use • Add script to the hammer sprite so when the space key is pressed and the hammer hits a mole then the score increases. • Hint: This needs to done for every mole sprite. • Hint: If the hammer is ever covered by a mole then add

  6. Mole Movement • When the green flag is clicked set a delay to show or hide the mole sprite. • Add a loop to delay showing the mole sprite and determine a how long you want to show that sprite. • Do this for each mole. Each one should have a different show and hide pattern.

  7. Ending the Game • When the green flag is clicked set a timer for 1 second more than the value set in the time variable. • Check to see if the score is bigger than 30. • If so, display the winning message. • If score is smaller than 30 then display the losing message. • Add a delay to allow for all sounds to finish and add code to stop everything.

More Related