Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using MIT Scratch for Programming and Control Exercise 6 – Creating a Scratch Packman Year 9 ICT Autumn Term 2007.

Similar presentations


Presentation on theme: "Using MIT Scratch for Programming and Control Exercise 6 – Creating a Scratch Packman Year 9 ICT Autumn Term 2007."— Presentation transcript:

1 Using MIT Scratch for Programming and Control Exercise 6 – Creating a Scratch Packman Year 9 ICT Autumn Term 2007

2 What you will learn: To design a maze background To resize a sprite To move a sprite under keyboard control Stop the sprite moving over the background To get ‘prizes’ to disappear To score with the prizes To get the prize to appear again unexpectedly To choose your own prizes To randomly alter the grid.

3 Stage 1 of Packman Maze Explorer‘Prize’ Score

4 Stage 2 of Packman Explorer moves

5 Stage 3 of Packman Explorer grabs prize Score goes up

6 Stage 4 of Packman Explorer moves on

7 Stage 5 of Packman ‘Prize’ reappears

8 What you need to decide To decide on a maze background grid. To decide on the sprite as the explorer. To plan the ‘prizes’ – the sprites and the points for each. To plan for how long a prize would disappear. To decide if the background will change to a new level or will the grid alter randomly.

9 Design a background The background must have one colour that the sprite cannot cross (blue in the example.) The passage ways must be broad enough to take the sprite.

10 Replace the Cat 1.Delete the cat sprite. 2.Choose a new sprite – use the central button under the stage. I called it the explorer. 3.Resize the sprite to make it small enough to follow the passages. Step 2Step 3 Step 1

11 Get the Sprite to Move Use the starting code as below – make sure all directions work.

12 Keep the Sprite on Track Stop the sprite moving over the background by … … checking if it has moved too far. If so, move back 5

13 Add a “Prize” Add a “prize” – a banana. Place it in a passageway. There should be a forever loop The script should hide the banana if it is touching the explorer. Remember to save your Scratch program.

14 Score Grabbing a Prize There are 2 parts A variable to store the score The score needs to increase when the prize is grabbed.

15 Restore the Prize The banana needs to reappear and at a random time makes a difference. Use the pick random 1 to 10 from Numbers Put it inside a wait. Decide on the longest and shortest waits Remember to save your Scratch program.

16 Introduce another Prize Introduce other sprites as prizes. Resize and add the correct script to each. Choose where each is to go, what effect it will have on the score, how quickly each should reappear. Remember to save your Scratch program.

17 Make your code efficient The script to stop the sprite going onto the grid might be more efficient. Do you have this section only once? Are there any other parts to be improved?

18 Further ideas Does the score set to zero for each game? Is there a time limit or a target score? Further sprites could be added to block/unblock sections of the grid. This could make the game change as it is played. There could be different levels with the background changing after a time. There could be tunnels which move the player to a new maze background …


Download ppt "Using MIT Scratch for Programming and Control Exercise 6 – Creating a Scratch Packman Year 9 ICT Autumn Term 2007."

Similar presentations


Ads by Google