SlideShare une entreprise Scribd logo
1  sur  28
Pong! 
“The oldest commercially 
available game in history” 
Resources created from the video tutorials provided by David Phillips on http://www.teach-ict.com
Stage 1 
• Before you start to script the game you need 
to create the assets. 
• Stage 1 will help you to create your 
background image, score zones, paddles (bats) 
and ball.
Getting Started – Open SCRATCH 
1. Log in 
2. Open a New Project 
3. Rename it PONG 
QUICK QUESTION: 
Why are you saving your file BEFORE 
you have changed anything?
Creating the background 
1. You need to select stage and background. 
2. Use the paint bucket to colour in the background. 
3. Use the line tool to create the center line. 
4. Use the rectangle tool to create the score zones in two 
contrasting colors – I have used red and blue in the example.
Creating the paddles part 1 
1. You need to delete the cat sprite. 
2. Right click and select delete.
Creating the paddles part 2 
1. Select paint new sprite. 
2. Use the rectangle tool to create a suitable paddle. 
3. Select OK. 
4. Right click to duplicate the paddle for player #2.
Creating the ball part 1 
1. Select “Chose new sprite from file”. 
2. Select the “Things” folder. 
3. Search for an appropriate ball sprite to use. 
4. Press OK.
Creating the ball part 2 
1. You need to shrink the ball using the shrink sprite tool. 
2. Hover over the ball sprite and click your mouse to 
shrink it to an appropriate size for your game. 
3. Then, re-arrange the assets to the “start position”.
Stage 2 
• Getting the paddles to move up and down. 
• Stage 2 will help you to make the player 1 and 
player 2 paddle controls to move them up and 
down on the Y axis.
Making the paddles move – Player #1 
1. Select the first paddle(sprite1). 
2. Create the script shown above. 
3. Right click to duplicate the script, 
then change the key to “z” and 
“-10” to move the paddle down.
Making the paddles move – Player #2 
1. Select the first paddle 
(sprite1). 
2. Drag the script over 
Sprite2 to copy the 
script for player #2. 
3. Select the second paddle (sprite 2), right click to 
duplicate the script, then change the keys to “up 
arrow” and “down arrow” and the values “10” 
and “-10” as per the previous script.
Stage 3 
• Getting the ball to move in a “fairly random” 
manner. 
• Stage 3 will help you to make the ball bounce 
off the sides of the game area with a simple 
script.
Making the ball move 
1. Select the ball (sprite3). 
2. Create the script shown above. 
3. Test the ball uses random directions by starting 
and stopping the game 2-3 times.
Stage 4 
• Playing the game. 
• Stage 4 will help you bounce the ball off the 
paddles so that the game can be played.
Setting up the paddles 
Use this 
operator to 
set up the 
direction 
instructions. 
1. You need to create an IF statement for the behaviour 
of each sprite, within the ball sprite. 
2. Select the ball (sprite3), create the statements above. 
3. Move them into the correct place in the ball script. 
4. Don’t forget to test that they work!
Stage 5 
• The score board(s). 
• Stage 5 will help you create scores for your 
game, using the red and blue score zones that 
you set up at the very start. 
• Remember blue = player 1 and red = player 2.
Setting up the score board part 1 
1. You need to create variables for each player. 
2. Select the ball (sprite3). 
3. Go to the variables options and select “make a 
variable”. 
4. Name the variable “Player1”, then repeat for 
“Player2”.
Setting up the score board part 2 
To select the score zone colour click on the 
coloured square for the dropper to come up, then 
click the dropper on the score zone. 
1. Create the if statements 
above to define the rules 
for scoring points. 
2. Then drag them into the 
forever command below 
the other if statements.
Stage 6 
• Improvements 
• Stage 6 will help you refine the scoring system 
and the starting position for the ball to make 
the game more accurate
Improvement #1 Re-setting the scores 
1. Use the set variable command to re-set the 
scores to zero each time the game is stopped 
and started again. 
2. Don’t forget to test it.
Improvement #2 Re-positioning the ball 
1. After a point has been scored the ball should 
be returned to the centre of the screen. 
2. Use the go to motion script adjustments above 
to create this.
Improvement #3 Adding a pause 
1. Adding a delay gives the players time to 
re-position their paddles for the next point. 
2. Use the wait control script adjustments above 
to create this.
Improvement #4 Changing direction 
1. Adding a delay gives the players time to 
re-position their paddles for the next point. 
2. Use the point in direction motion script and 
pick random operator. 
Check that you have 
set the direction for 
the correct player.
Summary 
• The scripts that you will use have been 
summarised here for you to check your work 
against.
Sprite1
Sprite2
Sprite3
Why not try . . . 
• 4 players in the game? 
• Changing the sprites to be more interesting? 
• Making the paddles shorter? 
• Speeding up the ball? 
• Making the score zone smaller, maybe add goal 
posts? 
• Changing the colours/layout to make it more child 
friendly? 
• Changing the layout/colours to make it more 
appealing to an older audience? 
• Writing instructions for the technical user and end 
users?

Contenu connexe

Tendances

Star logo nova code cookbook
Star logo nova  code cookbookStar logo nova  code cookbook
Star logo nova code cookbookBarbara M. King
 
4. catch the ball
4. catch the ball4. catch the ball
4. catch the ballMarc Jones
 
Level desighn workflow
Level desighn workflowLevel desighn workflow
Level desighn workflowKeatonBradley
 
Airez mier itec21
Airez mier itec21Airez mier itec21
Airez mier itec21Airez Mier
 
Run and jump tutorial (part 1) actors
Run and jump tutorial (part 1)   actorsRun and jump tutorial (part 1)   actors
Run and jump tutorial (part 1) actorsMuhd Basheer
 
Scratch for Data Logging and Graphing
Scratch for Data Logging and GraphingScratch for Data Logging and Graphing
Scratch for Data Logging and GraphingBrian Huang
 
The purpose and functions of components of game engines
The purpose and functions of components of game enginesThe purpose and functions of components of game engines
The purpose and functions of components of game enginesJoshCollege
 
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyInstructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyRenee Neumeier
 
Multipllication Bulls Eye
Multipllication Bulls EyeMultipllication Bulls Eye
Multipllication Bulls EyeRenegarmath
 
Jowen roche 2 d game workflow
Jowen roche 2 d game workflowJowen roche 2 d game workflow
Jowen roche 2 d game workflowaknatdeahobia
 
Sound Slide Tutorial
Sound Slide TutorialSound Slide Tutorial
Sound Slide Tutorialadamperez
 
SBMI Second Life Orientation for Online Classes Spring 2015
SBMI Second Life Orientation for Online Classes Spring 2015SBMI Second Life Orientation for Online Classes Spring 2015
SBMI Second Life Orientation for Online Classes Spring 2015E S
 
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
 

Tendances (20)

Star logo nova code cookbook
Star logo nova  code cookbookStar logo nova  code cookbook
Star logo nova code cookbook
 
4. catch the ball
4. catch the ball4. catch the ball
4. catch the ball
 
Geometrical_1
Geometrical_1Geometrical_1
Geometrical_1
 
Level desighn workflow
Level desighn workflowLevel desighn workflow
Level desighn workflow
 
Scratch
ScratchScratch
Scratch
 
Afternova luật
Afternova luậtAfternova luật
Afternova luật
 
Airez mier itec21
Airez mier itec21Airez mier itec21
Airez mier itec21
 
Triangles_forms_hexagon
Triangles_forms_hexagonTriangles_forms_hexagon
Triangles_forms_hexagon
 
Run and jump tutorial (part 1) actors
Run and jump tutorial (part 1)   actorsRun and jump tutorial (part 1)   actors
Run and jump tutorial (part 1) actors
 
Scratch for Data Logging and Graphing
Scratch for Data Logging and GraphingScratch for Data Logging and Graphing
Scratch for Data Logging and Graphing
 
The purpose and functions of components of game engines
The purpose and functions of components of game enginesThe purpose and functions of components of game engines
The purpose and functions of components of game engines
 
Fibonacci
FibonacciFibonacci
Fibonacci
 
Pong analysis gs
Pong analysis gsPong analysis gs
Pong analysis gs
 
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKeyInstructions for Scratch Pong Game Adaptation to use with MaKey MaKey
Instructions for Scratch Pong Game Adaptation to use with MaKey MaKey
 
Multipllication Bulls Eye
Multipllication Bulls EyeMultipllication Bulls Eye
Multipllication Bulls Eye
 
Jowen roche 2 d game workflow
Jowen roche 2 d game workflowJowen roche 2 d game workflow
Jowen roche 2 d game workflow
 
Sound Slide Tutorial
Sound Slide TutorialSound Slide Tutorial
Sound Slide Tutorial
 
SBMI Second Life Orientation for Online Classes Spring 2015
SBMI Second Life Orientation for Online Classes Spring 2015SBMI Second Life Orientation for Online Classes Spring 2015
SBMI Second Life Orientation for Online Classes Spring 2015
 
Scratch Lesson 6
Scratch Lesson 6Scratch Lesson 6
Scratch Lesson 6
 
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
 

En vedette

The canterbury tales
The canterbury talesThe canterbury tales
The canterbury talesjverftukli08
 
Copy of «stylistic classification of the english vocabulary»
Copy of «stylistic classification of the english vocabulary»Copy of «stylistic classification of the english vocabulary»
Copy of «stylistic classification of the english vocabulary»jverftukli08
 
Copy of stylistic differentiation of english vocabulary
Copy of stylistic differentiation of english vocabularyCopy of stylistic differentiation of english vocabulary
Copy of stylistic differentiation of english vocabularyjverftukli08
 
860 ppr1prsntn
860 ppr1prsntn860 ppr1prsntn
860 ppr1prsntnvkmitchell
 
用對大腦,人人都是幸福高手
用對大腦,人人都是幸福高手用對大腦,人人都是幸福高手
用對大腦,人人都是幸福高手維芬 楊
 
Copy of the story of beowulf
Copy of the story of beowulfCopy of the story of beowulf
Copy of the story of beowulfjverftukli08
 
«Stylistic classification of the english vocabulary»
«Stylistic classification of the english vocabulary»«Stylistic classification of the english vocabulary»
«Stylistic classification of the english vocabulary»jverftukli08
 
Copy of sdev stylistic differentiation of the english vocabulary
Copy of sdev stylistic differentiation of the english vocabularyCopy of sdev stylistic differentiation of the english vocabulary
Copy of sdev stylistic differentiation of the english vocabularyjverftukli08
 

En vedette (9)

IDfinal
IDfinalIDfinal
IDfinal
 
The canterbury tales
The canterbury talesThe canterbury tales
The canterbury tales
 
Copy of «stylistic classification of the english vocabulary»
Copy of «stylistic classification of the english vocabulary»Copy of «stylistic classification of the english vocabulary»
Copy of «stylistic classification of the english vocabulary»
 
Copy of stylistic differentiation of english vocabulary
Copy of stylistic differentiation of english vocabularyCopy of stylistic differentiation of english vocabulary
Copy of stylistic differentiation of english vocabulary
 
860 ppr1prsntn
860 ppr1prsntn860 ppr1prsntn
860 ppr1prsntn
 
用對大腦,人人都是幸福高手
用對大腦,人人都是幸福高手用對大腦,人人都是幸福高手
用對大腦,人人都是幸福高手
 
Copy of the story of beowulf
Copy of the story of beowulfCopy of the story of beowulf
Copy of the story of beowulf
 
«Stylistic classification of the english vocabulary»
«Stylistic classification of the english vocabulary»«Stylistic classification of the english vocabulary»
«Stylistic classification of the english vocabulary»
 
Copy of sdev stylistic differentiation of the english vocabulary
Copy of sdev stylistic differentiation of the english vocabularyCopy of sdev stylistic differentiation of the english vocabulary
Copy of sdev stylistic differentiation of the english vocabulary
 

Similaire à Pong on SCRATCH Directions

Fundamentals of Learning Game Design - ATD CIC 2017
Fundamentals of Learning Game Design - ATD CIC 2017Fundamentals of Learning Game Design - ATD CIC 2017
Fundamentals of Learning Game Design - ATD CIC 2017Sharon Boller
 
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 DesignSharon Boller
 
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 Tutorial - Basic Pong
Scratch Tutorial - Basic PongScratch Tutorial - Basic Pong
Scratch Tutorial - Basic PongInstantTechInfo
 
Analog game gdd_revised
Analog game gdd_revisedAnalog game gdd_revised
Analog game gdd_revisedjowyn
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxnilesh405711
 
Work Flow for 2D Game
Work Flow for 2D GameWork Flow for 2D Game
Work Flow for 2D Gamebowes96123
 
TornadoBrickSmasherUserManual
TornadoBrickSmasherUserManualTornadoBrickSmasherUserManual
TornadoBrickSmasherUserManualClayton Schembri
 
Makingagame in scratch
Makingagame in scratchMakingagame in scratch
Makingagame in scratchjyarwood26
 
Your Game Analytics Playbook
Your Game Analytics PlaybookYour Game Analytics Playbook
Your Game Analytics PlaybookGameAnalytics
 
Settlers of Catan Game Modification Business Proposal
Settlers of Catan Game Modification Business ProposalSettlers of Catan Game Modification Business Proposal
Settlers of Catan Game Modification Business ProposalS. Rose
 
BGC2011Scratch-Rev1.pdf
BGC2011Scratch-Rev1.pdfBGC2011Scratch-Rev1.pdf
BGC2011Scratch-Rev1.pdfTNGanesan
 
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_v1KerryJTurner
 

Similaire à Pong on SCRATCH Directions (20)

Game design document
Game design document Game design document
Game design document
 
Game design document
Game design document Game design document
Game design document
 
Fundamentals of Learning Game Design - ATD CIC 2017
Fundamentals of Learning Game Design - ATD CIC 2017Fundamentals of Learning Game Design - ATD CIC 2017
Fundamentals of Learning Game Design - ATD CIC 2017
 
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
 
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
 
Forest Archery Game
Forest Archery GameForest Archery Game
Forest Archery Game
 
Scratch Tutorial - Basic Pong
Scratch Tutorial - Basic PongScratch Tutorial - Basic Pong
Scratch Tutorial - Basic Pong
 
Forest Archery Game
Forest Archery GameForest Archery Game
Forest Archery Game
 
Analog game gdd_revised
Analog game gdd_revisedAnalog game gdd_revised
Analog game gdd_revised
 
Forest archery game
Forest archery gameForest archery game
Forest archery game
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
 
Work Flow for 2D Game
Work Flow for 2D GameWork Flow for 2D Game
Work Flow for 2D Game
 
TornadoBrickSmasherUserManual
TornadoBrickSmasherUserManualTornadoBrickSmasherUserManual
TornadoBrickSmasherUserManual
 
Pong
PongPong
Pong
 
Scratch Animation
Scratch AnimationScratch Animation
Scratch Animation
 
Makingagame in scratch
Makingagame in scratchMakingagame in scratch
Makingagame in scratch
 
Your Game Analytics Playbook
Your Game Analytics PlaybookYour Game Analytics Playbook
Your Game Analytics Playbook
 
Settlers of Catan Game Modification Business Proposal
Settlers of Catan Game Modification Business ProposalSettlers of Catan Game Modification Business Proposal
Settlers of Catan Game Modification Business Proposal
 
BGC2011Scratch-Rev1.pdf
BGC2011Scratch-Rev1.pdfBGC2011Scratch-Rev1.pdf
BGC2011Scratch-Rev1.pdf
 
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
 

Dernier

ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 

Dernier (20)

ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

Pong on SCRATCH Directions

  • 1. Pong! “The oldest commercially available game in history” Resources created from the video tutorials provided by David Phillips on http://www.teach-ict.com
  • 2. Stage 1 • Before you start to script the game you need to create the assets. • Stage 1 will help you to create your background image, score zones, paddles (bats) and ball.
  • 3. Getting Started – Open SCRATCH 1. Log in 2. Open a New Project 3. Rename it PONG QUICK QUESTION: Why are you saving your file BEFORE you have changed anything?
  • 4. Creating the background 1. You need to select stage and background. 2. Use the paint bucket to colour in the background. 3. Use the line tool to create the center line. 4. Use the rectangle tool to create the score zones in two contrasting colors – I have used red and blue in the example.
  • 5. Creating the paddles part 1 1. You need to delete the cat sprite. 2. Right click and select delete.
  • 6. Creating the paddles part 2 1. Select paint new sprite. 2. Use the rectangle tool to create a suitable paddle. 3. Select OK. 4. Right click to duplicate the paddle for player #2.
  • 7. Creating the ball part 1 1. Select “Chose new sprite from file”. 2. Select the “Things” folder. 3. Search for an appropriate ball sprite to use. 4. Press OK.
  • 8. Creating the ball part 2 1. You need to shrink the ball using the shrink sprite tool. 2. Hover over the ball sprite and click your mouse to shrink it to an appropriate size for your game. 3. Then, re-arrange the assets to the “start position”.
  • 9. Stage 2 • Getting the paddles to move up and down. • Stage 2 will help you to make the player 1 and player 2 paddle controls to move them up and down on the Y axis.
  • 10. Making the paddles move – Player #1 1. Select the first paddle(sprite1). 2. Create the script shown above. 3. Right click to duplicate the script, then change the key to “z” and “-10” to move the paddle down.
  • 11. Making the paddles move – Player #2 1. Select the first paddle (sprite1). 2. Drag the script over Sprite2 to copy the script for player #2. 3. Select the second paddle (sprite 2), right click to duplicate the script, then change the keys to “up arrow” and “down arrow” and the values “10” and “-10” as per the previous script.
  • 12. Stage 3 • Getting the ball to move in a “fairly random” manner. • Stage 3 will help you to make the ball bounce off the sides of the game area with a simple script.
  • 13. Making the ball move 1. Select the ball (sprite3). 2. Create the script shown above. 3. Test the ball uses random directions by starting and stopping the game 2-3 times.
  • 14. Stage 4 • Playing the game. • Stage 4 will help you bounce the ball off the paddles so that the game can be played.
  • 15. Setting up the paddles Use this operator to set up the direction instructions. 1. You need to create an IF statement for the behaviour of each sprite, within the ball sprite. 2. Select the ball (sprite3), create the statements above. 3. Move them into the correct place in the ball script. 4. Don’t forget to test that they work!
  • 16. Stage 5 • The score board(s). • Stage 5 will help you create scores for your game, using the red and blue score zones that you set up at the very start. • Remember blue = player 1 and red = player 2.
  • 17. Setting up the score board part 1 1. You need to create variables for each player. 2. Select the ball (sprite3). 3. Go to the variables options and select “make a variable”. 4. Name the variable “Player1”, then repeat for “Player2”.
  • 18. Setting up the score board part 2 To select the score zone colour click on the coloured square for the dropper to come up, then click the dropper on the score zone. 1. Create the if statements above to define the rules for scoring points. 2. Then drag them into the forever command below the other if statements.
  • 19. Stage 6 • Improvements • Stage 6 will help you refine the scoring system and the starting position for the ball to make the game more accurate
  • 20. Improvement #1 Re-setting the scores 1. Use the set variable command to re-set the scores to zero each time the game is stopped and started again. 2. Don’t forget to test it.
  • 21. Improvement #2 Re-positioning the ball 1. After a point has been scored the ball should be returned to the centre of the screen. 2. Use the go to motion script adjustments above to create this.
  • 22. Improvement #3 Adding a pause 1. Adding a delay gives the players time to re-position their paddles for the next point. 2. Use the wait control script adjustments above to create this.
  • 23. Improvement #4 Changing direction 1. Adding a delay gives the players time to re-position their paddles for the next point. 2. Use the point in direction motion script and pick random operator. Check that you have set the direction for the correct player.
  • 24. Summary • The scripts that you will use have been summarised here for you to check your work against.
  • 28. Why not try . . . • 4 players in the game? • Changing the sprites to be more interesting? • Making the paddles shorter? • Speeding up the ball? • Making the score zone smaller, maybe add goal posts? • Changing the colours/layout to make it more child friendly? • Changing the layout/colours to make it more appealing to an older audience? • Writing instructions for the technical user and end users?