SlideShare a Scribd company logo
1 of 13
Forest Archery Game
Forest Archery Game
http://scratch.mit.edu/tags/view/shooting
Starter Activity: Target Games
Check out the target style games:
Forest Archery Game
In this lesson you will learn how to use random
numbers, variables and collision detection. You
will create an archery style target game.
Lesson
 Become more familiar with translating an
algorithm into code
 Understand the use of variables
 Use if …else conditional statements
Objectives
Watch the video Forest Archery which is in the
programming in scratch folder in Groupwork to
learn how to create a target game.
Forest Archery Game
Task 12: Designing the Solution
Think about the two main things that you will need
to code:
1. moving the target
2. hitting the target
Code your program from the algorithms on the
next two slides. If you get struck, look back at the
video.
Forest Archery Game
Algorithm to move target (in Target sprite)
when flag is clicked
repeat forever
glide in 1 second to a random position*
* x is a random number from -240 to 240
y is a random number from -180 to 180
Forest Archery Game
Algorithm to move sight and fire (in Sight sprite)
when flag is clicked
repeat forever
go to mouse location (the mouse x and mouse y positions)
if the mouse button is down (the user has clicked the mouse)
if the sprite is touching the target sprite
add 1 to score variable
play Pop! sound
Say “Hit!” for 0.5 seconds
Forest Archery Game
Task 13: Hit and Miss
Change your program to so it takes 1 point off the
score every time a player misses!
If touching target
change score by 1
play Pop! sound
Say “Hit!” for 0.5 seconds
else
change score by -1
play Plunge! sound
say “Miss!” for 0.5 seconds
Forest Archery Game
You have already
programmed this
section
Task 14: Stay Positive!
Adapt the program so that the player will never
get a negative score. In order to achieve this you
will change your program so that points are only
taken away when the players score is above zero.
Forest Archery Game
Task 15: Bullseye!
Using if and touching colour blocks, change the
program so that when the target is hit, it adds the
following to the score:
•Gold - 5 points (and says “Bullseye!”)
•Red - 4 Points
•Blue - 3 Points
•Black - 2 Points
•White - 1 Point
Forest Archery Game
Variables
In this game, you used a variable block to keep
track of the score.
A variable is a space in a computer’s memory
where you can hold information used by your
program – just like storing things in a box.
Once a variable is created, the information stored
inside it can be set or changed (that is, varied –
hence the word “variable”).
Forest Archery Game
Plenary Question 1
Look at the adjacent script. The
programmer has made 3 errors.
Can you identify them?
1.
2.
3.
Forest Archery Game
Forest Archery Game
Keywords
 Understand the use of an algorithm to develop
a solution to a problem
 Translate an algorithm into code
 Use conditional statements
Objectives
 Collision
 Variable
 Random
 Repeat
 Forever
 Touching
 Value
 Nesting




More Related Content

Similar to Forest archery game

New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
nilesh405711
 

Similar to Forest archery game (20)

Pong on SCRATCH Directions
Pong on SCRATCH DirectionsPong on SCRATCH Directions
Pong on SCRATCH Directions
 
Pong on SCRATCH Directions
Pong on SCRATCH DirectionsPong on SCRATCH Directions
Pong on SCRATCH Directions
 
Play to Learn: Effective Learning Game Design
Play to Learn: Effective Learning Game DesignPlay to Learn: Effective Learning Game Design
Play to Learn: Effective Learning Game Design
 
Work Flow for 2D Game
Work Flow for 2D GameWork Flow for 2D Game
Work Flow for 2D Game
 
Pac man
Pac manPac man
Pac man
 
Evaluation fmp
Evaluation   fmpEvaluation   fmp
Evaluation fmp
 
Data analysis & balancing meeting thibault coupart avril 2015
Data analysis & balancing meeting thibault coupart avril 2015Data analysis & balancing meeting thibault coupart avril 2015
Data analysis & balancing meeting thibault coupart avril 2015
 
How to Design Effective Learning Games: Sharon Boller and Karl Kapp
How to Design Effective Learning Games: Sharon Boller and Karl KappHow to Design Effective Learning Games: Sharon Boller and Karl Kapp
How to Design Effective Learning Games: Sharon Boller and Karl Kapp
 
A mazing Game
A mazing GameA mazing Game
A mazing Game
 
My life as a Game
My life as a GameMy life as a Game
My life as a Game
 
Scratch project
Scratch projectScratch project
Scratch project
 
Lesson1
Lesson1Lesson1
Lesson1
 
DevLearn 2017 Play to Learn workshop slides
DevLearn 2017 Play to Learn workshop slidesDevLearn 2017 Play to Learn workshop slides
DevLearn 2017 Play to Learn workshop slides
 
LAFS Game Design 9 - Balancing
LAFS Game Design 9 - BalancingLAFS Game Design 9 - Balancing
LAFS Game Design 9 - Balancing
 
Designing games with kodu_game_lab_v1
Designing games with kodu_game_lab_v1Designing games with kodu_game_lab_v1
Designing games with kodu_game_lab_v1
 
Fearsome thornypigeons leelisa_teamassignment1_0315
Fearsome thornypigeons leelisa_teamassignment1_0315Fearsome thornypigeons leelisa_teamassignment1_0315
Fearsome thornypigeons leelisa_teamassignment1_0315
 
Hackathon 2013 - The Art Of Cheating In Games
Hackathon 2013 - The Art Of Cheating In GamesHackathon 2013 - The Art Of Cheating In Games
Hackathon 2013 - The Art Of Cheating In Games
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
 
A Primer On Play: How to use Games for Learning and Results
A Primer On Play: How to use Games for Learning and ResultsA Primer On Play: How to use Games for Learning and Results
A Primer On Play: How to use Games for Learning and Results
 
Pig in space
Pig in spacePig in space
Pig in space
 

More from cachs_computing (20)

It and computing assessment
It and computing assessmentIt and computing assessment
It and computing assessment
 
Scratching the surface
Scratching the surfaceScratching the surface
Scratching the surface
 
Creating your first web page
Creating your first web pageCreating your first web page
Creating your first web page
 
Introduction
IntroductionIntroduction
Introduction
 
Desktop publishing
Desktop publishingDesktop publishing
Desktop publishing
 
Spreadsheets
SpreadsheetsSpreadsheets
Spreadsheets
 
Internet
InternetInternet
Internet
 
Getting technical introduction
Getting technical introductionGetting technical introduction
Getting technical introduction
 
It and computing assessment
It and computing assessmentIt and computing assessment
It and computing assessment
 
Introduction
IntroductionIntroduction
Introduction
 
Word processing 2
Word processing 2Word processing 2
Word processing 2
 
Word processing 1
Word processing 1Word processing 1
Word processing 1
 
Desktop publishing
Desktop publishingDesktop publishing
Desktop publishing
 
Spreadsheets
SpreadsheetsSpreadsheets
Spreadsheets
 
Introduction functional skills
Introduction functional skillsIntroduction functional skills
Introduction functional skills
 
Internet
InternetInternet
Internet
 
Search engines
Search enginesSearch engines
Search engines
 
Fetch execute cycle
Fetch execute cycleFetch execute cycle
Fetch execute cycle
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Sounds and images
Sounds and imagesSounds and images
Sounds and images
 

Recently uploaded

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (16)

Personal Brand Exploration - By Bradley Dennis
Personal Brand Exploration - By Bradley DennisPersonal Brand Exploration - By Bradley Dennis
Personal Brand Exploration - By Bradley Dennis
 
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docx
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docxNetherlands Players expected to miss UEFA Euro 2024 due to injury.docx
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docx
 
Genuine 8617370543 Hot and Beautiful 💕 Etah Escorts call Girls
Genuine 8617370543 Hot and Beautiful 💕 Etah Escorts call GirlsGenuine 8617370543 Hot and Beautiful 💕 Etah Escorts call Girls
Genuine 8617370543 Hot and Beautiful 💕 Etah Escorts call Girls
 
Croatia vs Italy Inter Milan Looking to Carry On Success at Euro 2024.pdf
Croatia vs Italy Inter Milan Looking to Carry On Success at Euro 2024.pdfCroatia vs Italy Inter Milan Looking to Carry On Success at Euro 2024.pdf
Croatia vs Italy Inter Milan Looking to Carry On Success at Euro 2024.pdf
 
Hire 💕 8617370543 Amethi Call Girls Service Call Girls Agency
Hire 💕 8617370543 Amethi Call Girls Service Call Girls AgencyHire 💕 8617370543 Amethi Call Girls Service Call Girls Agency
Hire 💕 8617370543 Amethi Call Girls Service Call Girls Agency
 
basketball evolution History Slides.pdf
basketball evolution  History Slides.pdfbasketball evolution  History Slides.pdf
basketball evolution History Slides.pdf
 
Unveiling the Mystery of Main Bazar Chart
Unveiling the Mystery of Main Bazar ChartUnveiling the Mystery of Main Bazar Chart
Unveiling the Mystery of Main Bazar Chart
 
Cricket Api Solution.pdfCricket Api Solution.pdf
Cricket Api Solution.pdfCricket Api Solution.pdfCricket Api Solution.pdfCricket Api Solution.pdf
Cricket Api Solution.pdfCricket Api Solution.pdf
 
Belgium Vs Slovakia Belgium at Euro 2024 Teams in group, fixtures, schedule, ...
Belgium Vs Slovakia Belgium at Euro 2024 Teams in group, fixtures, schedule, ...Belgium Vs Slovakia Belgium at Euro 2024 Teams in group, fixtures, schedule, ...
Belgium Vs Slovakia Belgium at Euro 2024 Teams in group, fixtures, schedule, ...
 
Slovenia Vs Serbia Eurovision odds Slovenia have top.docx
Slovenia Vs Serbia Eurovision odds Slovenia have top.docxSlovenia Vs Serbia Eurovision odds Slovenia have top.docx
Slovenia Vs Serbia Eurovision odds Slovenia have top.docx
 
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docxAlbania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
 
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics TradeTechnical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
 
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Spain Vs Italy Spain to be banned from participating in Euro 2024.docx
Spain Vs Italy Spain to be banned from participating in Euro 2024.docxSpain Vs Italy Spain to be banned from participating in Euro 2024.docx
Spain Vs Italy Spain to be banned from participating in Euro 2024.docx
 
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdfJORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
 

Forest archery game

  • 2. Forest Archery Game http://scratch.mit.edu/tags/view/shooting Starter Activity: Target Games Check out the target style games:
  • 3. Forest Archery Game In this lesson you will learn how to use random numbers, variables and collision detection. You will create an archery style target game. Lesson  Become more familiar with translating an algorithm into code  Understand the use of variables  Use if …else conditional statements Objectives
  • 4. Watch the video Forest Archery which is in the programming in scratch folder in Groupwork to learn how to create a target game. Forest Archery Game
  • 5. Task 12: Designing the Solution Think about the two main things that you will need to code: 1. moving the target 2. hitting the target Code your program from the algorithms on the next two slides. If you get struck, look back at the video. Forest Archery Game
  • 6. Algorithm to move target (in Target sprite) when flag is clicked repeat forever glide in 1 second to a random position* * x is a random number from -240 to 240 y is a random number from -180 to 180 Forest Archery Game
  • 7. Algorithm to move sight and fire (in Sight sprite) when flag is clicked repeat forever go to mouse location (the mouse x and mouse y positions) if the mouse button is down (the user has clicked the mouse) if the sprite is touching the target sprite add 1 to score variable play Pop! sound Say “Hit!” for 0.5 seconds Forest Archery Game
  • 8. Task 13: Hit and Miss Change your program to so it takes 1 point off the score every time a player misses! If touching target change score by 1 play Pop! sound Say “Hit!” for 0.5 seconds else change score by -1 play Plunge! sound say “Miss!” for 0.5 seconds Forest Archery Game You have already programmed this section
  • 9. Task 14: Stay Positive! Adapt the program so that the player will never get a negative score. In order to achieve this you will change your program so that points are only taken away when the players score is above zero. Forest Archery Game
  • 10. Task 15: Bullseye! Using if and touching colour blocks, change the program so that when the target is hit, it adds the following to the score: •Gold - 5 points (and says “Bullseye!”) •Red - 4 Points •Blue - 3 Points •Black - 2 Points •White - 1 Point Forest Archery Game
  • 11. Variables In this game, you used a variable block to keep track of the score. A variable is a space in a computer’s memory where you can hold information used by your program – just like storing things in a box. Once a variable is created, the information stored inside it can be set or changed (that is, varied – hence the word “variable”). Forest Archery Game
  • 12. Plenary Question 1 Look at the adjacent script. The programmer has made 3 errors. Can you identify them? 1. 2. 3. Forest Archery Game
  • 13. Forest Archery Game Keywords  Understand the use of an algorithm to develop a solution to a problem  Translate an algorithm into code  Use conditional statements Objectives  Collision  Variable  Random  Repeat  Forever  Touching  Value  Nesting   

Editor's Notes

  1. If score greater than 1 – should be set to 0 One of the mouse x – should be set to mouse y The second change score should be set to -1 that than +1