29
Using Scratch in Key Stage 3 ICT Curriculum Created by Andrew Rhodes Page | 1 Central Enfield City Learning Centre Using Scratch in Key Stage 3 ICT Curriculum Outline Plan Year 7 An 8 hour/8 week (half term) module looking at the basic concepts of building a computer game. The unit will make use of a free software application called Scratch (download available at http://scratch.mit.edu). The key concepts that will be covered involve designing sprites, moving sprites both free moving and moving under mouse control and collision detection. Whilst covering the learning objectives students will build a simple game. The exact type of game is up to the teacher, although for the purposes of this guide, a pong type game is assumed National Curriculum Links This unit of work contributes to National Strategy Objectives substrand 2.2 Models and Modelling. The unit contributes to some of the year 7 objectives. This unit of work covers National Strategy Objectives substrand 2.3 sequencing instructions. The unit covers all year 7 and some year 8 objectives. This unit of work also covers National Strategy Objectives substrand 4.1 evaluating work. The unit of work covers all of the year 7 objectives. Overview Lesson 1 Background to Scratch/Games. Students should be introduced to the idea that scratch can be used to create games and be given a chance to deconstruct a pong game (supplied). Lesson 2 What are sprites? Students should design a sprite that they can use as a ball in their game. The stage (background area) in scratch. Design/ find a suitable background. Lesson 3 Animating the ball sprite. How should sprite move? Realism could be introduced here (links with Physics). Simple collisions as ball hits edge of screen. Lesson 4 Design a second sprite for bat. Moving bat under mouse control (other methods of control for the bat could be explored). Lesson 5 How do we get the ball to recognise when it has hit the bat? The principle of collision detection. Playing a sound when the ball hits the bat. Lesson 6 Putting it all together. Build a Pong game that works Lesson 7 Evaluating design. Is my finished product fit for purpose and does it meet the needs of my audience?

Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Embed Size (px)

Citation preview

Page 1: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 1  Central Enfield City Learning Centre 

 Using Scratch in Key Stage 3 ICT Curriculum 

Outline Plan  Year 7 

• An 8 hour/8 week (half term) module looking at the basic concepts of building a computer game. 

• The unit will make use of a free software application called Scratch (download available at http://scratch.mit.edu). 

• The key concepts that will be covered involve designing sprites, moving sprites both free moving and moving under mouse control and collision detection. 

• Whilst covering the learning objectives students will build a simple game. The exact type of game is up to the teacher, although for the purposes of this guide, a pong type game is assumed 

 National Curriculum Links 

This unit of work contributes to National Strategy Objectives substrand 2.2 Models and Modelling. The unit contributes to some of the year 7 objectives. This unit of work covers National Strategy Objectives substrand 2.3 sequencing instructions. The unit covers all year 7 and some year 8 objectives. This unit of work also covers National Strategy Objectives substrand 4.1 evaluating work. The unit of work covers all of the year 7 objectives.  

  Overview Lesson 1 Background to Scratch/Games. Students should be introduced to the idea that scratch can be used to create games and be given a chance to deconstruct a pong game (supplied). Lesson 2 What are sprites? Students should design a sprite that they can use as a ball in their game. The stage (background area) in scratch. Design/ find a suitable background.  Lesson 3 Animating the ball sprite. How should sprite move? Realism could be introduced here (links with Physics). Simple collisions as ball hits edge of screen. Lesson 4 Design a second sprite for bat. Moving bat under mouse control (other methods of control for the bat could be explored). Lesson 5 How do we get the ball to recognise when it has hit the bat? The principle of collision detection. Playing a sound when the ball hits the bat. Lesson 6 Putting it all together. Build a Pong game that works Lesson 7 Evaluating design. Is my finished product fit for purpose and does it meet the needs of my audience?     

 

Page 2: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 2  Central Enfield City Learning Centre 

  

Suggested Outline  Lesson 1 

Background Objectives – Students will understand the features of a successful game.     They will understand the success criteria for evaluating their games.  Introduce to students the idea that they are going to be studying a unit looking at developing computer games and will write a game of their own. Could show students some simple early computer games (be aware many links will not work as games is almost certainly a blocked category on your network). Version of classic pong game http://www.xnet.se/javaTest/jPong/jPong.html  Starters could include brainstorming what makes simple games such as Tetris, pacman and pong addictive and compelling games. Alternatively you could brainstorm features of compelling games in general.  Main activity in the lesson should focus around giving the students a chance to look at games created with scratch, and give students a pong game to deconstruct and highlight key features of a pong style game like the one that students will be making. You may also wish to give students a chance to look around the scratch website. Students should also start to think about how they will individualise their game – they should develop a theme. This could be history related, science fiction, or any other theme students wish to use. Their background, ball etc should reflect their theme. Website  http://scratch.mit.edu  

Page 3: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 3  Central Enfield City Learning Centre 

 The scratch homepage 

  Scratch is a free download and students should be encouraged to download at home. You may wish to explore setting up accounts with students as this will allow them to upload games to the site.  It is worth showing them some of the support materials available as these include how to guides and also videos which you may wish to refer students to during lessons. Students could also be given the opportunity to explore the games created using scratch so that they start to see what it is capable of and also some its limitations.  Finishing Off could be based around the students feeding back features of games that they thought were good and giving examples of their features and functionality. You could also cover the capabilities and some of the limitations of the software.  Included in this pack is the reference guide for scratch and getting started guide. If time allows, you could begin to explore some of the basic functionality of scratch by using the getting started guide with students, although this will be explored as you move through the unit. Scratch Getting Started Guide Scratch Reference Guide  

Page 4: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 4  Central Enfield City Learning Centre 

Lesson 2 Creating Sprites and Stages (backgrounds) 

Objectives  Students will understand the components required for their game.                They will have created a ball sprite and a background. 

They will understand what constitutes an appropriate and effective background. 

 Starter What is a sprite? How is a sprite created? What is a sprite made up of? It is worth exploring the ideas above by using a few examples of sprites 

Examples of sprites from PAC MAN (from Google Images) 

 Sprites from Space Invaders (from Google Images)  

Page 5: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 5  Central Enfield City Learning Centre 

Discuss what sprites are made from i.e. blocks of colour, and explain that most sprites are drawn into the computer.    Main Activity Students should use scratch paint editor to create their own ball sprite for their pong game. They should also create a background or stage for their game (this could be very simple as in the example or more complex such as a jpeg).  The ball sprite  

1. Open scratch software. 2. Start a new scratch project by clicking on New button at top of screen. 3. You will need to delete the scratch cat sprite that is in every program by default.  

To do this click on the scissors and then click on the cat sprite. 

  

4. You are now going create your own sprite. Open the paint editor by clicking on this 

button    which is located here;  

  

5. The paint editor is much like Microsoft paint. You will need to design a sprite to be a ball in your game. Do not make it too complicated but you can add your own details. Also, do not make it too big as it is a ball!   

First click on the scissors here…

…and then click on the cat! 

Page 6: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 6  Central Enfield City Learning Centre 

   

 The Paint Editor 

 6. Congratulations! You have created your first sprite. 7. Rename you sprite by clicking here; 

 

 Call your sprite something sensible like “ball”. 

8. Now you need to create a stage. A stage is a background in scratch – we can either import a picture or draw our own simple background. 

 9. Either import or draw a background. Either click on import and find the picture or 

paint a background. 

Click on the icon of the stage here 

Click here to rename your sprite

Page 7: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 7  Central Enfield City Learning Centre 

 You will need to make sure you click on the background tab so it is highlighted in blue.  

10. Stages (backgrounds) should be kept fairly plain and will need to have a base, e.g.,  

   

  

11. Students should also save their work by clicking on “save as” and naming their file appropriately.  

     

This is an example of a background that would be ideal for our game. 

This is an example of a background that is probably a little bit too busy or complicated for our game. 

Page 8: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 8  Central Enfield City Learning Centre 

 Finishing Off A simple plenary would be to ask students to recap learning during the lesson i.e. what is a sprite? How do we create sprites and backgrounds in scratch? You could also look at the sprites and backgrounds that students have created during the lesson and ask for peer evaluation (what are the good features and what could be improved?)  

Page 9: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 9  Central Enfield City Learning Centre 

Lesson 3  Making the ball move and detect edges of screen 

  Objectives  Students will understand that the ball model is not a realistic one. 

They will understand the mathematics and programming associated with making the ball move. 

 Starter A suitable starter could include a discussion about how balls should move. You could drop a tennis ball and ask how a computer could recreate this. You could include a discussion about gravity and how we model this. Alternatively, if you did not have time to evaluate sprites and backgrounds from the previous session this could be covered now.  Main Activity  The main activity for the session is to get the ball sprite to move around the screen. Included as a part of this, the ball should be able to respond appropriately when it hits the edge of the screen.  1. Open the game that you saved last lesson by clicking on open and locating your 

game.  

 

2. Click on the ball sprite that you created last lesson. 

  

3. In the main window, click on the scripts tab. 

  

4. You are going to create a script (or set of instructions) to control the ball; you will need to click on the motion button. 

Click here and find your game

Click on your sprite 

Click on the scripts tab 

Page 10: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 10  Central Enfield City Learning Centre 

 5. There are a number of instructions that we could use but for the time being you 

are going to create a script to start the ball in the same place each time the game starts. 

To do this, drag the instruction that looks like this  into your script. In the space for x, click and type 13 and in the space for y click and type 157. You could use other numbers but these are roughly in the centre at the top of the screen. You may wish to experiment with other numbers to see what happens. 

6. You want this to happen at the start of the game. Games start in scratch when you click on the green flag so you need to make your script happen then. To do this, click on the control button at the side of your screen. 

 

7. Drag the instruction that looks like this   and attach it to the first instruction that you placed in you script. Place it on top of the first instruction and they should link together. 

 8. Congratulations! You have created your first script. The ball still doesn’t do very 

much so now we need to make it move around the screen. We need to create a second script to do this.  

Click here to open the motion instructions. Which instruction do you think you need to use? 

Click on the control button here

Your script should look like this 

Page 11: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 11  Central Enfield City Learning Centre 

9. Start this script with the instruction that you just used . Next you need to add an instruction that will make this happen over and over again (or forever). Join that instruction up to the first one. 

10. Inside the forever instruction, you need to add some movement instructions to make the ball bounce around the screen. Click on the motion button;  

 11. Use the instruction that looks like this  followed by the instruction  

. These will need to be linked together with the first instructions in your script, to complete a second script that looks like this; 

  Experiment to see what happens when you change the number of steps until you find a number where the ball moves at a reasonable speed.  

12. If you have done this correctly, your ball should bounce around the screen on its own.  Finishing Off There are a number of possible plenaries. You could ask a few students to show their work and explain how the script that controls the ball works. Students could explain what happens when they changed the x and y coordinates in the first script and the number of steps in the second script. If time allows you could also brainstorm the next steps in creating the pong game.           

Click on the motion button here 

Your completed scripts should look like this 

Page 12: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 12  Central Enfield City Learning Centre 

   

Page 13: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 13  Central Enfield City Learning Centre 

Lesson 4  Design a bat sprite. Moving bat under mouse control 

 Objectives  Students will apply previous knowledge to design and create a bat 

sprite. They will be able to program the bat to move under control of the mouse. Some students may also program the bat to move using the keyboard.  

Starter Review with students the use of the paint editor to design sprites. Discuss ideas for a simple bat sprite. Discuss methods of player control of bat sprite (mouse or keyboard are obvious method on PC, although students may also suggest joypad/stick).  Main Activity 1. You will need to design a suitable sprite to work as a paddle/bat in the game. 

This only needs to be a fairly simple rectangular shape, but you may wish to add your own touches! Open the paint editor and choose the rectangle shape to start off. Remember not to make it too big, as it needs to be in proportion to your ball. 

  

2. Once you have designed your paddle sprite, remember to rename it. Now you will need to make it move. To do this, you need to write a script to control it. You could use either a mouse or keyboard to control it. Click on your paddle sprite and then click on the script tab like you did last lesson; 

 

Click on the rectangle tool….

….and drag out a rectangle on this part of the screen. 

…click on the script tab 

Rename your paddle sprite, and then….

Page 14: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 14  Central Enfield City Learning Centre 

3. You need to start your script with the instruction  , and then add a forever instruction. 

4. Having done this, you then need to be able to move the paddle when you 

move the mouse. You do this by using the instruction  and then you need to click on the sensing button as your script will need to sense when you move the mouse. 

 5. You now need to find the instruction that relates to mouse moving in the x 

(horizontal direction). It looks like this  . Place it in the set x instruction instead of the 0. 

6. Your completed script should look something like this; 

  

7. You could also use the keyboard to control your paddle. Can you work out how you would do this?  To control the paddle using the keyboard is more difficult as it involves separate keys to control left and right. Students need to use control instructions and motion instructions to build two scripts that when completed should look something like this; 

  Finishing Off If students have had time to explore alternative ways of controlling the paddle, this could be discussed and students could present their findings. If not this could provide a useful class discussion point and could be modelled as students suggest ways to construct the scripts necessary. 

 

Click on the Sensing button 

Your completed script should look like this! 

Clicking here allows you to change the key used to move… 

….and clicking here controls how far the paddle moves each time 

Page 15: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 15  Central Enfield City Learning Centre 

Lesson 5  Get the ball to recognise when it has hit the bat 

 Objectives  Students will understand the concept of collision detection and 

how it relates to their game.   They will be able to make the ball respond in a suitable way when 

it collides with the bat.   They will be able to use loop instructions to make the bat respond 

to the movement of the mouse. Some students may have added sounds to their game to denote a collision. 

Starter Collision detection is a key feature of computer games. For our pong game to be successful the ball must know when it hits the bat, and how to respond when it does. A suitable starter could involve asking students what they think collision detection is and how the ball should respond when it hit the bat. They may suggest that it should respond similarly to when it hits the edge. Unfortunately bounce only works in scratch when an object detects an edge. The ball should bounce off at an angle similar to the one it hit the bat at – it may be worth bouncing the tennis ball again to model this behaviour. You could also relate the behaviour of the ball to light hitting a mirror which students should have covered in science.  There is a great simulation of this at; http://www.freezeray.com/flashFiles/Mirror.htm which may help with the explanation/discussion.  Main Activity  1. Open the scratch project that you have been working on. 2. You need to create a new script for the ball so that it knows when it has hit 

the bat. To do this, click on the ball; 

     and then click on the scripts tab; 

  

3. You need to start off your script with the instruction  . 

4. Next add a forever if instruction   

Click on your sprite 

Click on the scripts tab 

Page 16: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 16  Central Enfield City Learning Centre 

5. You now need to add an instruction so the ball knows when it hits the bat, so click on the sensing button 

  

6.  Now drag the instruction that looks like this   to your script. 7. Click on the little black arrow and select your bat/paddle sprite. 8. Now you need to add the control instruction into your script. This is going 

to be in three parts. 

9. The first part is     This instruction tells scratch that when the ball hits the paddle it should point in the opposite direction. To write this instruction, click on the motion button, 

 Find the instruction that looks like this  . You will then need to change the instruction in the white box to match the instruction above. To do this, click on the numbers button.   

10. The second part is   This instruction makes the ball bounce a bit more randomly. It is still a bit too easy to hit the ball each time, so… 

11. The final part is  This instruction also makes the ball behave a bit more randomly still.  Why not try to change the numbers in the last two instructions to see how this effects how the ball moves. Can you make the ball move in an even more random way?  Extension Adding sounds. Students could add sounds when the ball hits the bat.  1. Click on the sound button 

Click on the Sensing button 

Click on the motion button. 

Page 17: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 17  Central Enfield City Learning Centre 

   

2. The instruction play sound needs to be added into the script that controls what happens when the ball touches the bat. You need to pull out the instructions from the forever if loop, and then add the play sound instruction at the top 

      

3. Now add the play sound instruction and put it back in the forever if loop, so that your script looks like this; 

 4. You can change the sound that is played when the bat and ball hit by 

importing different sounds. To do this, you simply click on the sounds tab  

    and then click the import button. 5. Choose the sound that you want to import, and then go back to the play 

sound instruction. Click on the little black arrow and your new sound is available for you to choose. 

  

Click on the sound button. 

Click and drag these instructions out of the forever if loop. 

Click on the sounds tab… 

…And then click on the import button. 

Click on the little black arrow and choose your sound. 

Page 18: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 18  Central Enfield City Learning Centre 

6. You can also record your own sounds by using the record button (you will need to have a microphone attached to the computer to do this though!) 

  Finishing Off A good plenary could be to discuss how we can introduce the element of randomness into how the ball moves. Have students found any better combinations of numbers in the final two instructions? What happens if you change these numbers too much? Do the paddle and the ball interact in a realistic way? Again it would be good practice to show some student games and allow them to explain how they have overcome the challenges of paddle and ball interaction. Another possible plenary could be to ask students to suggest how this pong type game could be made more challenging and suggest ways that this could be achieved given what they have learnt. Some suggestions may to make the ball speed up as time passes, or to score the number of collisions between paddle and ball. Students could introduce the idea of a certain number of lives. These are just a few possible suggestions. 

Page 19: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 19  Central Enfield City Learning Centre 

Lesson 6 Putting It All Together 

Objectives  Students will complete a pong style game.  They apply the concept of collision detection to decide when the ball has hit the bottom of the screen. Some students will also add a scoring system, lives, game over screen, speeding up as game progresses.   

 Starter There are a variety of possible starters that could be used to start this lesson and the starting point will largely depend on where the class as a whole have got to with their projects. Students could be asked to show their projects and explain where they are up to and what still remains to be done. The main idea that needs to be completed is that the game needs to stop if the bat misses the ball and the ball touches the bottom of the screen. How could this be achieved? Alternatively, if most students have just about completed their game, you could ask them how they are going to develop them further. Students may wish to include a mechanism for scoring, or a mechanism to speed the game up as it progresses, or a mechanism to give players a certain number of lives. Possible solutions to these challenges could be elicited from the students, and are outlined below.  Main Activity The main purpose of the lesson is to get a fully working pong game, so students should make this the focus of this session. Most students should have most of the required elements and the final step is just to put base in, to stop the game if the player misses the ball with the bat. 

1. The easiest way to do this requires editing the background slightly. To do this, open the game, and click on the stage 

 2. You need to edit the stage by clicking on the backgrounds tab and clicking the edit 

button beside the stage. 

 

Open your game and click on the stage here…

Page 20: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 20  Central Enfield City Learning Centre 

 3. Your background will open in the paint editor. You need to create a thin coloured 

rectangle at the bottom of the screen. You can use any colour but make sure that it stands out against your background. 

4. Use the rectangle tool to do this; 

 5. When you have finished this, click ok to save the changes to the background. 6. You need to create a script to tell the ball what to do when it hits the bottom of 

the screen. You can add this to the very first script that you created telling the ball where to start on the screen. Click on the ball sprite that you made,  

 and then click on the script tab. 

 7. Click on the control button on the left hand side 

Click on the background tab… 

Then click on the edit button. 

Use the rectangle tool to create a bright coloured thin rectangle at the bottom of the screen… 

…that looks something like this! 

Click on the ball sprite. 

Click on the scripts tab. 

Page 21: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 21  Central Enfield City Learning Centre 

 8. Add a wait until instruction and a stop all instruction to your first script so it looks 

like this; 

 9. Finally, you need to put in one last instruction that lets the ball sense when it is 

touching the rectangle. Click on the Sensing button 

 

10. From the list of instructions, pick the   instruction and drag it into the diamond shaped box in the wait until instruction, so it looks like 

this . If you click on the coloured box it will change to a pipette which will let you click on any colour on the screen. Click on your coloured rectangle on the bottom of your background. 

11. Your game should now be fully working. Try it out to make sure it all works.  Students that have completed their game should look to add some of the additional aspects that have been discussed as part of the plenary from the last lesson or the starter from this lesson. An outline of how some of these tasks could be achieved is given below. Since this is extension material you will need to decide how much help to give students on these tasks.  Plenary There are a variety of possible approaches to the plenary for this lesson. The best approach       

 

Click on the control button  

Click on the Sensing button 

Page 22: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 22  Central Enfield City Learning Centre 

Keeping Score 1. Creating a scoring mechanism is actually fairly straight forward, but you will need 

to create a new variable first. To do this, first open the scratch project that you have been working on. Click on the variable button 

 2. You will need to create a new variable. To do this click on the make a variable 

button 

 3. You will need to give your variable a name. As it is going to keep score, “score” is 

probably the most appropriate name. 

  

4. Now you have created the score variable, you need to add it into your script. It will need to go in the script that controls what happens when the ball hits the bat. Your edited script should look like this; 

 You could have the score change by a different number say 5 or 10. How would you do this? 

5. You need to make sure that the score is displayed on the screen. To do this, make sure that the score box is ticked on the left hand side of the screen 

 

Click on the variable button 

Click on the make a variable button

Click in the space and type the name of your variable. 

Leave the black circle in this box….

…and then click ok. 

Make sure that this box is ticked to see the score 

Page 23: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 23  Central Enfield City Learning Centre 

   

 6. Think about how you would reset the score to zero before the start of each new 

game. You will need another script that looks like this; 

  

7. How could you extend this idea of keeping score to count the number of lives that a player has?                          

 Getting Faster 

There are several ways to achieve this but the easiest is outlined below; 1. You will need to create a variation of the script that controls how the ball bounces 

when it hits the edge of the screen. To do this, first click on the control button 

 

Click on the control button 

Page 24: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 24  Central Enfield City Learning Centre 

2. The first part of your script should look like this; 

 3. When you have these blocks assembled, you need to build the conditions that you 

want scratch to wait until. If you want the speed to increase when a certain score 

is reached, you will need to add these blocks  . Change the number so it matches the score where you want the game to get faster (3 in the example). 

4. The last part of the script is the same as the original script you built to control how the ball bounced off the edges, and should look something like this; 

 See what happens when you change the number of steps that the ball moves. Remember that your game should get more difficult but still needs to be possible to play! 

5. The whole script should look something like this; 

  

6. How could you edit your game further so that there were more levels and the game got gradually faster as you moved up to each different level? 

             

 

Page 25: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 25  Central Enfield City Learning Centre 

   

Lives This is a more complex task than either of the other suggested extension tasks. 

1. You will first need to create a new variable which could be called “lives”. To do this, first open the scratch project that you have been working on. Click on the variable button 

 2. You will need to create a new variable. To do this click on the make a variable 

button 

 3. You will need to give your variable a name. As it is going to keep track of lives left, 

“lives” is probably the most appropriate name. 

  

4. The first thing you need to do is give the player a set number of lives at the start of the game. To do this create a script that looks like this 

 5. You now need to edit the script that controls what happens when the ball hits the 

bottom of the screen. You want the player to lose as life each time the ball hits 

the bottom of the screen. You can do this by using this instruction  . 6. If you just add this into the script that controls what happens when the ball hits 

the bottom of the screen, the game still stops, so you will need to make some adjustments to the script. 

    

Click on the variable button 

Click on the make a variable button

Click in the space and type the name of your variable. 

Leave the black circle in this box….

…and then click ok. 

This will not work. Can you explain why not? 

Page 26: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 26  Central Enfield City Learning Centre 

 7. You will need to create two separate scripts from this one script. One will keep a 

count of the number of lives that have been used and one will stop the game when the number of lives reaches zero. The two scripts could look something like this; 

 8. You could also try to think of a way to put a message on the screen when the 

game is over.                          

This script takes a life off each time the ball hits the bottom of the screen until lives = 0. 

This script stops the game when lives = 0.

Page 27: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 27  Central Enfield City Learning Centre 

 

Game Over 1. The easiest way to do this is to create a new sprite and use the paint editor to 

create the text. 

 2. You then need to create a script to hide this text at the start of the game. This 

could look something like this; 

 The hide instruction is found by clicking the looks button. 

3. You will also need an instruction to make this message appear at the end of the game when there are no lives left. This involves modifying slightly one of your earlier scripts. Find the script that stops the game when lives = 0. It should look like this; 

 4. Remove the last instruction from this script, and replace it with the broadcast 

instruction  . Click on the little black arrow and click on new. 5. Type your message name in the box, “game over” would be a good message. 

      

Type your message in this box and click ok. Your message could be “game over”.

Page 28: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 28  Central Enfield City Learning Centre 

6. Now click back on the game over sprite you made  

 and click on scripts. 

 7. Create a script that says when I receive “game over”, show and stop all scripts. It 

could look something like this; 

      

    

Page 29: Using Scratch in Key Stage 3 ICT Curriculum - T.E.I. Kavaxis.teikav.edu.gr/pake/Enotita_7_Logismika_PE19-20/Scratch/Using... · Using Scratch in Key Stage 3 ICT Curriculum ... Using

Using Scratch in Key Stage 3 ICT Curriculum

Created by Andrew Rhodes    Page | 29  Central Enfield City Learning Centre 

Lesson 7 Evaluating your Work 

 Starter If you saved the brainstorm work with students from lesson 1, this would be a good point at which to revisit it, to remind students of the factors that they felt made simple games compelling. From this, you could ask students how they could evaluate the features of a good game, what factors do we need to take into account, and from there you could introduce the key factors that they will need to use to evaluate their game.  Main Activity Students need to devise a means of evaluating their game and then get feedback from other students. There are a number of different ways this could be done, but perhaps the easiest is to ask students to work in small groups to evaluate each others’ games.  Students will need to come up with a simple questionnaire that other students can fill in after they have looked at the game.