0 results for
Responsive image

Lesson 5 - Sensing

0 results forGuest
Flight Path
Learning Objectives
0 results forGuest
 5 I can use Sensing

🏁 Learning Objective 16 :- I can use Sensing


In maze, pong, or collide type games, you usually want a sprite to bounce back or move when it touches an edge or an object. This can be accomplished by using a Sensing block such as the ones shown to the right. These blocks are usually placed in a block and then an block (which are Control blocks) along with Motion blocks that tell the sprite how far to move.


Flight Path

Exercise - Create a Pong Game

Create a Pong Game in scratch using the instructions below


First, choose an appropriate backdrop. Wall 1 backdrop and Neon Tunnel are good choices. Make sure that the backdrop doesn't have any bright red in it, as this will interfere with the scripts created later. Then, draw a red line at the bottom of the backdrop to represent the area the ball should not touch. The shade of red you create this line with should not be the same shade as any red in the backdrop or in sprites you are using.

Creating the Paddle

To create a paddle, create a sprite that is a horizontal line. Then, add the following script to make it follow the mouse pointer: Scratch

Creating the Ball

Create a script that is a small circle to represent the ball. Then, add the following scripts to make it move, bounce, and end the game if it misses the paddle: Scratch

source - https://en.scratch-wiki.info/wiki/Pong

Extension Task

How can you improve pong, can you add a timer? Or get the paddle to change colour when it touches the ball?

Exercise 2 - Create a Maze Game

Create a Maze Game in scratch


First, create an appropriate backdrop like the one below. Make sure that the backdrop has a coloured line for the end of the maze so you know when the maze is complete.


Moving your sprite

Add a suitable sprite like the mouse below, then set its size.


Now add some blocks to help it move like the ones below.


Starting position and a timer

You need to find the starting position of your sprite, so you can go to the co-ordinate where you want your sprite to start, then you need to create a timer variableso that you can limit the time the player has to complete the maze


Adding Sensing

Add some sensing blocks, like the ones below, to your script, so that your sprite knows if it is touching the maze or has completed the level


Extension Task - adding levels

Can you improve your game by adding more levels to it?

Update your learning objectives


0 results forGuest
Recent Comments

Teacher Date: 2020-08-13