SlideShare a Scribd company logo
1 of 25
Whack-a-Witch!
We would like to inform our users
that NO witches were harmed during
the making of this game.
Introduction:
This project is like the game Whack-a-Mole. You
get points for hitting the witches that appear on
the screen. The aim is to get as many points as
possible in 30 seconds!
1. Start a new scratch project.
2. Remove the cat sprite and replace the
background with the nature/woods
background.
3. Use the new sprite from file button to add a
new witch sprite to the project (use the
fantasy/witch1 costume).
Now we want to make our witch move
4. Add a Variable for this sprite only called speed .
On the Stage, the stage monitor for this variable
should say “Sprite1 speed”. If it just says
“speed”, delete the variable and create it again,
for this sprite only. Uncheck the box next to the
speed block in the Variables palette so it does
not show on the Stage.
The speed variable will control how fast the
witch moves. We use a variable so that
we can change how fast the witch moves as the
game progresses.
5. We want the witch to start moving when
the game starts, so make a script like this:
Test Your Project
Click the green flag and see what your witch
does. Why does she get stuck on the edge of the
screen?
6. To stop the witch getting stuck we need to
make her go back the other way when she
touches the edge of the screen.
Below your move speed steps block
add an if on edge, bounce block
7. To stop the witch flipping upside down, click
on the only face left-right button in the Sprite
Summary area:
Test Your Project
Does the witch move from side to side on the
screen?
Things to try
• Try changing the value of the speed variable
to make her fly faster or slower.
• How would you make the witch get faster
the longer she flies? (This is a tricky one, so
don’t worry if you can’t see how to do it.
You’ll get more clues as you work through
the project.)
To make the game more fun, we want the
witch to appear and vanish randomly.
We’ll do that with another script that runs at
the same time as the one that moves
the witch. This new script needs to hide the
witch for a random time, then show her
for a random time, and repeat that forever (or
until the game finishes).
Create this script for the witch:
Test Your Project
Click the green flag
Does the witch move from side to side across the
screen and vanish and appear again randomly?
Things to try
• Try changing the range of the random
numbers. What happens if you pick very big
numbers or very small numbers?
(Does this give you any more clues for how to
make the witch speed up the longer the game is
played?)
To turn this into a game, we need to give the
player something to do. They need to click on
the witch to make her disappear. When the
witch is clicked, we want her to disappear and
play a sound.
1. In the Sounds tab, import the sound
electronic/fairydust.
2. Add this script to the witch:
Test Your Project
Click the green flag
Does the witch disappear and play the sound
when you click it?
Things to try
• If you want to, record your own sound to
play.
We’ve got a witch, but now we want to make a
game! We want to score points every time we
click on the witch but we also want to have a time
limit on the game. We can use a variable for the
score and the timer.
1. Create a new Variable for all sprites called
score, and alter the script for the witch to
increase this variable by one when she is clicked.
2. Switch to the Stage and create a new variable
(this time just for the stage) called timer. Add a
new script that occurs when the green flag is
clicked to set timer to 30 and reset the score to 0.
Then use a repeat until block to wait a second and
then reduce timer by one. This should repeat until
timer is 0, at which point use stop all to stop the
game.
Test Your Project
Things to try
• How might you make the witch speed up as
the game goes on?
Well done you’ve finished
the basic game. There are
more things you can do to
your game though. Have
a go at the challenge on
the next slide!
Test Your Project
Do you have three witches that move from side
to side across the screen, randomly appear and
disappear, and disappear when you click on
them?
Well done you’ve finished, now you can
enjoy the game!

More Related Content

What's hot

Programming in scratch
Programming in scratchProgramming in scratch
Programming in scratchHussam Mostafa
 
Mx management center user guide v2
Mx management center user guide v2Mx management center user guide v2
Mx management center user guide v2cloughb
 
Mx management center user guide v2
Mx management center user guide v2Mx management center user guide v2
Mx management center user guide v2cloughb
 
Mx management center user guide v2
Mx management center user guide v2Mx management center user guide v2
Mx management center user guide v2cloughb
 
Scratch parrot shoot game
Scratch   parrot shoot gameScratch   parrot shoot game
Scratch parrot shoot gamemrsharma2015
 
3. production experiments
3. production experiments3. production experiments
3. production experimentsyorkcollege
 

What's hot (9)

Programming in scratch
Programming in scratchProgramming in scratch
Programming in scratch
 
Mx management center user guide v2
Mx management center user guide v2Mx management center user guide v2
Mx management center user guide v2
 
Mx management center user guide v2
Mx management center user guide v2Mx management center user guide v2
Mx management center user guide v2
 
Mx management center user guide v2
Mx management center user guide v2Mx management center user guide v2
Mx management center user guide v2
 
Chromakey
ChromakeyChromakey
Chromakey
 
_SEM-InstructionManual
_SEM-InstructionManual_SEM-InstructionManual
_SEM-InstructionManual
 
How do i
How do iHow do i
How do i
 
Scratch parrot shoot game
Scratch   parrot shoot gameScratch   parrot shoot game
Scratch parrot shoot game
 
3. production experiments
3. production experiments3. production experiments
3. production experiments
 

Similar to 03 whack a-witch!

Scratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditScratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditBibekPandit2
 
Scratch Parrot Game
Scratch Parrot GameScratch Parrot Game
Scratch Parrot Gamejenloudun
 
We are going to learn to program!
We are going to learn to program!We are going to learn to program!
We are going to learn to program!jenloudun
 
4.2 responding to events
4.2   responding to events4.2   responding to events
4.2 responding to eventsallenbailey
 
3. production experiments (interactive)
3. production experiments (interactive)3. production experiments (interactive)
3. production experiments (interactive)Stephen Royle
 
2d game printscreens
2d game printscreens2d game printscreens
2d game printscreensElliot Black
 
2d game engine workflow
2d game engine workflow2d game engine workflow
2d game engine workflowluisfvazquez1
 
Scratch Introduction
Scratch IntroductionScratch Introduction
Scratch IntroductionGirijaSuthoju
 
Scratch Lesson 1 move with arrow keys
Scratch Lesson 1 move with arrow keysScratch Lesson 1 move with arrow keys
Scratch Lesson 1 move with arrow keysArtfulArtsyAmy
 
Introduction to Scratch.ppt
Introduction to Scratch.pptIntroduction to Scratch.ppt
Introduction to Scratch.pptSMARTCLASS4
 

Similar to 03 whack a-witch! (20)

Scratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditScratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek pandit
 
Scratch Parrot Game
Scratch Parrot GameScratch Parrot Game
Scratch Parrot Game
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
We are going to learn to program!
We are going to learn to program!We are going to learn to program!
We are going to learn to program!
 
4.2 responding to events
4.2   responding to events4.2   responding to events
4.2 responding to events
 
Scratch Lesson 1
Scratch Lesson 1Scratch Lesson 1
Scratch Lesson 1
 
maze runner game.pptx
maze runner game.pptxmaze runner game.pptx
maze runner game.pptx
 
Lesson 2 The Maze Runner.pptx
Lesson 2 The Maze Runner.pptxLesson 2 The Maze Runner.pptx
Lesson 2 The Maze Runner.pptx
 
3. production experiments (interactive)
3. production experiments (interactive)3. production experiments (interactive)
3. production experiments (interactive)
 
Work flow
Work flowWork flow
Work flow
 
A mazing Game
A mazing GameA mazing Game
A mazing Game
 
2d game printscreens
2d game printscreens2d game printscreens
2d game printscreens
 
Make a game in scratch
Make a game in scratchMake a game in scratch
Make a game in scratch
 
Workflow
WorkflowWorkflow
Workflow
 
2d game engine workflow
2d game engine workflow2d game engine workflow
2d game engine workflow
 
Δραστηριότητες Lego με scratch...
Δραστηριότητες Lego με scratch...Δραστηριότητες Lego με scratch...
Δραστηριότητες Lego με scratch...
 
Scratch Introduction
Scratch IntroductionScratch Introduction
Scratch Introduction
 
Scratch Lesson 1 move with arrow keys
Scratch Lesson 1 move with arrow keysScratch Lesson 1 move with arrow keys
Scratch Lesson 1 move with arrow keys
 
Kangaroo tutorial
Kangaroo tutorialKangaroo tutorial
Kangaroo tutorial
 
Introduction to Scratch.ppt
Introduction to Scratch.pptIntroduction to Scratch.ppt
Introduction to Scratch.ppt
 

Recently uploaded

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Recently uploaded (20)

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 

03 whack a-witch!

  • 1. Whack-a-Witch! We would like to inform our users that NO witches were harmed during the making of this game.
  • 2. Introduction: This project is like the game Whack-a-Mole. You get points for hitting the witches that appear on the screen. The aim is to get as many points as possible in 30 seconds!
  • 3.
  • 4. 1. Start a new scratch project. 2. Remove the cat sprite and replace the background with the nature/woods background. 3. Use the new sprite from file button to add a new witch sprite to the project (use the fantasy/witch1 costume).
  • 5.
  • 6. Now we want to make our witch move 4. Add a Variable for this sprite only called speed . On the Stage, the stage monitor for this variable should say “Sprite1 speed”. If it just says “speed”, delete the variable and create it again, for this sprite only. Uncheck the box next to the speed block in the Variables palette so it does not show on the Stage.
  • 7. The speed variable will control how fast the witch moves. We use a variable so that we can change how fast the witch moves as the game progresses. 5. We want the witch to start moving when the game starts, so make a script like this:
  • 8. Test Your Project Click the green flag and see what your witch does. Why does she get stuck on the edge of the screen? 6. To stop the witch getting stuck we need to make her go back the other way when she touches the edge of the screen. Below your move speed steps block add an if on edge, bounce block
  • 9. 7. To stop the witch flipping upside down, click on the only face left-right button in the Sprite Summary area: Test Your Project Does the witch move from side to side on the screen?
  • 10. Things to try • Try changing the value of the speed variable to make her fly faster or slower. • How would you make the witch get faster the longer she flies? (This is a tricky one, so don’t worry if you can’t see how to do it. You’ll get more clues as you work through the project.)
  • 11. To make the game more fun, we want the witch to appear and vanish randomly. We’ll do that with another script that runs at the same time as the one that moves the witch. This new script needs to hide the witch for a random time, then show her for a random time, and repeat that forever (or until the game finishes). Create this script for the witch:
  • 12. Test Your Project Click the green flag Does the witch move from side to side across the screen and vanish and appear again randomly?
  • 13. Things to try • Try changing the range of the random numbers. What happens if you pick very big numbers or very small numbers? (Does this give you any more clues for how to make the witch speed up the longer the game is played?)
  • 14. To turn this into a game, we need to give the player something to do. They need to click on the witch to make her disappear. When the witch is clicked, we want her to disappear and play a sound. 1. In the Sounds tab, import the sound electronic/fairydust. 2. Add this script to the witch:
  • 15. Test Your Project Click the green flag Does the witch disappear and play the sound when you click it?
  • 16. Things to try • If you want to, record your own sound to play.
  • 17. We’ve got a witch, but now we want to make a game! We want to score points every time we click on the witch but we also want to have a time limit on the game. We can use a variable for the score and the timer. 1. Create a new Variable for all sprites called score, and alter the script for the witch to increase this variable by one when she is clicked.
  • 18. 2. Switch to the Stage and create a new variable (this time just for the stage) called timer. Add a new script that occurs when the green flag is clicked to set timer to 30 and reset the score to 0. Then use a repeat until block to wait a second and then reduce timer by one. This should repeat until timer is 0, at which point use stop all to stop the game.
  • 20. Things to try • How might you make the witch speed up as the game goes on?
  • 21. Well done you’ve finished the basic game. There are more things you can do to your game though. Have a go at the challenge on the next slide!
  • 22.
  • 23. Test Your Project Do you have three witches that move from side to side across the screen, randomly appear and disappear, and disappear when you click on them?
  • 24.
  • 25. Well done you’ve finished, now you can enjoy the game!