100% found this document useful (5 votes)
753 views22 pages

Cool Scratch Projects TOCCh1 1

This document introduces several cool Scratch projects including Magic Mirror, Gribbet!, Drum Machine, 12 Angry Aliens, 3D Artist, Space Mine 3D, Maze Maker and Circuit Breaker, 3D Maze Explorer, Sprites Cameras Action!, and Super Wheelie in ScratchJr. It provides tips for building the projects and notes that some projects may not work on older Raspberry Pi models or run slowly. Resources for downloading project scripts and images are also listed.

Uploaded by

Radim Mácha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
753 views22 pages

Cool Scratch Projects TOCCh1 1

This document introduces several cool Scratch projects including Magic Mirror, Gribbet!, Drum Machine, 12 Angry Aliens, 3D Artist, Space Mine 3D, Maze Maker and Circuit Breaker, 3D Maze Explorer, Sprites Cameras Action!, and Super Wheelie in ScratchJr. It provides tips for building the projects and notes that some projects may not work on older Raspberry Pi models or run slowly. Resources for downloading project scripts and images are also listed.

Uploaded by

Radim Mácha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Contents

Introduction
Top tips for making these cool projects 7
Notes and Resources 8

1 Magic Mirror 9
Introducing Magic Mirror 10
Using Scratch 11
Using Scratch 1.4 12
Making the cat move 13
Making the mirror 16
Adding the reflection 19
Adding the magic controls 20
Polishing the magic mirror 22

2 Gribbet! 23
Introducing Gribbet! 24
Drawing the frog’s body 25
Drawing the frog’s face 28
Drawing the background 30
Animating the eyes 31
Setting up the variables 33
Adding the frogs’ scripts 34
Making the final images 37
Adding the main game script 38
Ending the game 39
Customizing Gribbet! 40

3 Drum Machine 41
Introducing Drum Machine 42
Drawing the background 43
Drawing the grid 44
Adding the beat marker 45
Adding the cursor 47
Adding the switch controls 49
Adding a drum 51
Adding finishing touches 53
Remixing Drum Machine 54

4 12 Angry Aliens 55
Introducing 12 Angry Aliens 56
How the 3D effect works 57
Testing the anaglyph effect 58
Making the starry sky 59
Drawing the crosshairs 60
Moving the crosshairs 62
Adding the target sprites 64
Adding the red alien scripts 65
Adding the cyan alien scripts 66
Adding the fire button 67
Customizing the game 68

5 3D Artist 69
Introducing 3D Artist 70
Building 3D Artist 71
Adding the random artist 73
Customizing 3D Artist 74

6 Space Mine 3D 75
Introducing Space Mine 3D 76
Drawing the tunnel 77
Drawing the numbers 78
Setting up the game 79
Adding the tunnel 80
Adding the numbers 81
Building the game 83
Adding the finishing touches 86
7 Maze Maker and Circuit Breaker 87
Introducing Maze Maker 88
Making the grid 89
Preparing the background 90
How the maze maker works 91
Checking rooms and walls 92
Understanding how it works 95
Testing the wall checker 96
Preparing for the cat code 97
Making the maze maker 98
Adding components 99
Saving mazes 100
Displaying mazes 101
Adding the bug 102
Adding the player’s sprite 104
More amazing ideas to try 107

8 3D Maze Explorer 109


Introducing Maze Explorer 110
Creating the wall images 111
Creating the door 113
Creating the sky and floor 115
Positioning the left walls 116
Testing the walls 119
Adding the right walls 120
Building the test maze 121
Entering movement data 123
Adding the player scripts 125
Drawing the maze 126
Showing the walls 129
Testing the maze display 132
Adding player movement 133
Adding a compass 136
Adding the exit door 137
9 3D Maze Explorer: Finishing touches 139
Rewarding the player 140
Adding collectables 142
Collecting items 144
Using drawn mazes 145
Adding a map 147
Customizing the game 148

10 Sprites, Cameras, Action! 149


Sprites, Cameras, Action! 150
Shooting and viewing shots 151
Editing the frame sequence 154
Adding captions 156

11 Super Wheelie in ScratchJr 157


Introducing ScratchJr 158
Starting Super Wheelie 159
Building the first level 160
Adding the second level 163

12 Five shorties 165


Scratch Cat Maestro 166
Going Dotty 168
Pipeline Defender 170
Digital Scoreboard 173
Baby, I’m a starfish! 174

Index
Introduction
This book shows you how to build lots of cool projects in Scratch.
My other book, Scratch Programming in easy steps, goes into
more depth on how Scratch works. Some readers might read that
book first and then come here to try these new projects. Others
will enjoy making these projects first and then seek out the
Scratch Programming book when they want to understand more If you share these
projects or reuse bits
about what the blocks do.
of them in your own
I recommend you start this book with Magic Mirror and Gribbet!, projects, please mention
because they gently introduce some ideas you’ll need for other this book. Thank you!
projects later. As you build these projects, think about what each
script does, so you avoid making mistakes copying from the book.

Top tips for making these cool projects

l 1 Read the instructions carefully. They’ll tell you how to


build the scripts and which sprites they belong to.
Check the first page

l 2 Use Scratch 2.0. If you have a choice, use Scratch 2.0.


If you’re using Scratch 2.0 online, right-clicking doesn’t
of each project for
any warnings about

7
which computers and
work, so you need to hold the Shift key and click instead. Scratch versions the

l
project works on. 3D
3 Tweak for Raspberry Pi. Look out for special Artist doesn’t work on
instructions for the Raspberry Pi. Not all projects will the Raspberry Pi, for
work on the Pi, especially if you have an older model. example, and some
projects run slowly on

l 4 Create variables carefully. Check the instructions to see


whether the variable is for all sprites or just for one.
the Model B+.

l 5 Beware of lookalike blocks. Whenever you see a block


with set or change on it, for example, double-check you’re
using the right one. Look out too for if and if...else.

l 6 Check the details. Make sure you change the menus in


the blocks correctly, and type the correct things into the
white holes in them.
In this book, I’ve
assumed that if you’re

l
using Scratch 1.4, you’re
7 Take care with yellow brackets. It can get difficult when on a Raspberry Pi, and
you have brackets inside brackets, but the program won’t that if you’re using
work if you put blocks in the wrong place. Scratch 2.0, you’re using
it online.
Introduction

Notes and Resources


Downloading the projects
If you can’t get the projects to work, or if you want to take a
shortcut, you can download the scripts or the images. The examples
for Scratch 1.4 on Raspberry Pi can be downloaded from the
author’s website at www.sean.co.uk and the publisher’s website at
Visit the author’s website
www.ineasysteps.com (select the menu entitled Free Resources
for any updates plus
bonus content including and choose the Downloads section). The examples for Scratch 2.0
10-block demos, videos are online at http://scratch.mit.edu/users/seanmcmanus/
of these projects, sounds
you can use in your Installing sounds on the Raspberry Pi
games, and more. The instruments and drum sounds aren’t installed in Scratch on
the Raspberry Pi. You’ll need them for several projects in this
book, including Drum Machine and Gribbet!. To install them:

l 1 In the Pi desktop, click the Terminal button


at the top. It looks like a computer screen.

l 2 Type the command sudo apt-get update in the terminal


window.

l
8

3 Type in /usr/share/scratch/timidityinstall.sh

l 4 Type sudo reboot in the terminal to reboot your


Raspberry Pi. Make sure you’ve saved all your work first.

Acknowledgements
Thank you to Sevanti and the team at In Easy Steps, David
Burder from 3D Images Ltd, Danny Wolfers, and Tim Rowledge.
Scratch is developed by the Lifelong Kindergarten Group at the
MIT Media Lab. See http://scratch.mit.edu
ScratchJr is a project of Tufts University, MIT Media Lab, and
Playful Invention Company. See http://scratchjr.org

Dedication
This book is dedicated to Karen and Leo. Leo loves the color
By the same author, green. We hope he will one day enjoy the inside of this book as
Scratch Programming much as the cover. Special thanks to Karen for all of her support.
in easy steps covers the
full range of Scratch’s About the author
capabilities, and has Sean McManus is an expert technology author. His previous
more detail on how the books include Scratch Programming in easy steps, Web Design in
language works. easy steps and Raspberry Pi For Dummies (co-authored).
1 Magic Mirror

In your first project, you’ll see 10 Introducing Magic Mirror


how to make sprites move 11 Using Scratch
under your control, how to 12 Using Scratch 1.4
use the Paint Editor, and 13 Making the cat move
how to spice things up with 16 Making the mirror
graphic effects. 19 Adding the reflection
20 Adding the magic controls
22 Polishing the magic mirror
Magic Mirror

Introducing Magic Mirror


At the funfair, you sometimes see an attraction where your
reflection is twisted, stretched and squashed in warped mirrors.
Now you can bring the fun home, with the Scratch Magic Mirror.
It takes up less space than a funfair, and has three buttons to
change the distortion. (Even more magically, it shows the side of
you that’s facing away from the mirror, although that is more to
do with how it works, than anything mystical.)
This project provides an easy start in Scratch, but even if you’re an
The Scripts Area expands experienced Scratcher, I recommend you try it. Many of the ideas
to fill the screen space
and techniques here will come up again later in this book, and
available, so if you
use a larger monitor,
this chapter provides a useful introduction to them.
the Scripts Area will By making Magic Mirror, you’ll discover how to:
be bigger than in my
screenshots.
• Add sprites and sounds to your project
• Change the background
• Create scripts to control your sprites
• Make sprites move under your control
10

• Use broadcasts to coordinate between sprites


• Use the graphic effects
• Edit the images used for sprites and backgrounds

This script and many


others in this book run
noticeably faster on the
Raspberry Pi if you go
into full screen mode.
Click the Easel icon,
above the Stop button.
The Stop button is above
the Stage.
Using Scratch
The main parts of the screen in Scratch are:

• Stage: This is where you can see your animations and games
in action. When Scratch starts, there’s a large orange cat in
the middle of the Stage.

• Sprite
There’s also ScratchJr for
List: The cat is a ‘sprite’, which is like a character or tablet devices, covered
object in a game. The Sprite List shows all the sprites that are in Chapter 11. It’s
in your project. You click them to switch between them. completely different to

• Blocks
the computer versions of
Palette: In Scratch, you give the computer commands Scratch.
using blocks, which are instructions that fit together like
jigsaw pieces. The Blocks Palette presents you with all the
blocks you can use. When you start Scratch, you can see the
Motion blocks, which are color-coded in dark blue, and are
used for moving sprites. You can browse a different set of
blocks in the Blocks Palette by clicking one of the buttons
above it, such as the Looks button or the Sound button.

• Scripts Area: The Scripts Area is where you make your


programs in Scratch, by joining blocks together there. If you have a choice, pick

11
Scratch 2.0. It doesn’t
The screen is laid out differently in Scratch 1.4 (the older version,
work on the Raspberry
but still used on the Raspberry Pi) and Scratch 2.0 (the newer Pi or on the iPad, but
version). See below for the layout in Scratch 2.0, and see page 12 it runs on most other
for Scratch 1.4. computers.

Tabs

Scripts Area

Stage

Blocks Palette

Sprite List

Left: Scratch 2.0


Magic Mirror

Using Scratch 1.4


The screen layout in Scratch 1.4 is different to Scratch 2.0, and
there are two other important differences to look out for:

• See brown, think yellow!


There are no Events blocks in
If you’re using Scratch on Scratch 1.4, but most of them
the Raspberry Pi, you’re are still there as yellow Control
using Scratch 1.4. blocks. In this book, when you
see a brown block, pretend
it’s yellow and you’ll do fine.
Here’s the when green flag
clicked block in Scratch 1.4 (top) and Scratch 2.0 (bottom).

• Scratch
Don’t get in a spin looking for rotation!
2.0 has a block called set rotation style. This block
doesn’t exist in Scratch 1.4. Instead, you look above the
Blocks Palette and click one of the three buttons to the left
of your sprite. The middle button sets the style to left-right.
Scratch 2.0 also has
new blocks for cloning
12

sprites and creating your


own blocks. I haven’t
used them in this book,
though, so the programs
work in Scratch 1.4.

Tabs

Blocks Palette

Stage

Scripts Area

Sprite List

Right: Scratch 1.4


Making the cat move
We’ll build up the Magic Mirror program gradually. We’ll start
with the cat’s movement.

l 1 To start using Scratch on Raspberry Pi, open the


Programs Menu and select it in the Programming section.
To start using Scratch 2.0 online visit http://scratch.mit. Blocks often have menus,
edu/ in your browser and click Create at the top. shown with a small
triangle pointing down.

l
If you can’t find the
2 Click the Events or Control button above the Blocks exact block you need,
Palette. Find the block called when space key pressed. check for something
Drag it and drop it in the Scripts Area. similar with a menu in it.
It might have the option

l 3 Click the menu in


the block and choose
the right arrow key
you’re looking for.

(pictured, right).

l 4 Click the Motion


button above the

13
Blocks Palette.
To get rid of a block

l
again, drag it back
5 Drag a point in into the Blocks Palette.
direction 90 block Careful, though: it will
into the Scripts take any attached blocks
Area. Drop it just underneath your previous block, so that with it!
it joins to the previous block. Joined blocks make up what
is called a “script”. A game is made up of lots of scripts.

l 6 Drag a move 10 steps block in and join it to your script.

l 7 Click the Looks button above the Blocks Palette.

l
In Scratch 2.0, if you
8 Drag a next costume create an account and
block and attach it log in before you start,
to the bottom of it will automatically
your script. Check save your work for you.
your script with the Click your name in the
top right to find your
picture here.
projects (or “stuff” as
the menu says).
Magic Mirror

...cont’d

l 9 Press the right arrow key on the keyboard, and you


should see the cat on the Stage move to the right. The
script you’ve made provides all the instructions for this. It
A costume is an image works like a to-do list for the computer, read from top to
that a sprite has. The bottom: “when the right arrow key is pressed, turn to face
cat has two costumes right, walk ten steps, and then change the costume”.
with its legs in different
positions. When you
switch between them,
it looks like its legs are
moving. To see the
l10 Let’s add controls to move left. The quickest way to do
this is to copy the script we’ve made and change it. If
you’re using Scratch 2.0 online, hold down the Shift
costumes, click the key and click the script. If you’re using Scratch 1.4 or
Costumes tab. Click the Scratch 2.0 offline, right-click the script. When the menu
Scripts tab to get back appears, click duplicate. The copied script follows your
to the Scripts Area again mouse. Find a blank space in the Scripts Area and click
afterwards.
the left mouse button to drop the script there.
14

The cat only moves


once for each keypress
l11 In your copied script, click the menus in the when right
arrow key pressed and point in direction 90 blocks and
change them for the left movement as shown here.
because the move 10
steps block moves
the cat a distance of
10 steps in one go. It
doesn’t move the cat 10
times. Try clicking the
box in the block and
changing the number to
see how it affects the
cat’s movements.
...cont’d

l12 What happens when


you test it? The cat
flips on its head to
walk left, because it’s The go to front block
been rotated. Let’s will make sure the cat
fix that, and also put appears in front of other
the cat in its starting sprites in this project,
position. See if you including the mirror and
its reflection.
can make the script here. The color of the blocks tells you
which part of the Blocks Palette they’re in. For blocks
with numbers in, you can click the numbers to edit them,
delete them or type new numbers in. In Scratch 1.4, there
is no set rotation style block, so ignore that.

l13 In Scratch 1.4, you need to set the rotation style to left-
right using a button beside the sprite above the Blocks
Palette. It’s the middle button with a double-headed
arrow on it. Click it to set the rotation style.

15
When you drag a block
out of a script, all the
blocks underneath go
with it. To remove just
one block, first drag it
out, with the attached
blocks. Then drag the
attached blocks away
and back into the script.
To delete the spare

l14 Add the script below to make the cat jump when you
press the up arrow key.
blocks, drag them back
into the Blocks Palette.

The brown Events blocks


are yellow Control blocks
in Scratch 1.4.
Magic Mirror

Making the mirror


The Stage is looking a bit plain. Let’s decorate it.

l 1 To the left of the Sprite List there


is an icon for the Stage. In Scratch
2.0, there is a button underneath it
Scratch 2.0 calls them to choose a new backdrop from the
“backdrops” and library. It looks like a mountain scene (see picture). In
Scratch 1.4 calls them
Scratch 1.4, click the Stage icon, click the Backgrounds
“backgrounds”. Whatever
you call them, they’re
tab above the Scripts Area, then click the Import button.

l
the images at the back
of the Stage. Sprites 2 In Scratch 2.0, click the Indoors category on the left.
cannot go behind them. In Scratch 1.4, double-click the Indoors folder. You can
scroll to see more pictures here. Find a picture you like,
click it and then click OK.
16

If you make a mistake


using the Paint Editor,
click the Undo button.
In Scratch 2.0, it’s an
arrow curved to the left,
above the canvas. In
Scratch 1.4, it says Undo
l 3 The mirror and the wall it hangs on will be another sprite,
even though it’ll fill the Stage and look like a background.
Click the button above the Sprite List to paint a new
on it, and it’s above the sprite. The button has a paintbrush on it.
Paintbrush tool.

l 4 In Scratch 1.4, click the magnifying


glass with a minus on it to make
sure you can see the whole sprite.
There should be no scroll bars
below or to the right of the canvas.
...cont’d

l 5 Your color palette is underneath the canvas (the drawing


area) in Scratch 2.0, and to the left in Scratch 1.4. Click
the color you’d like to use for your wall. I chose lilac.

l 6 The tools are to the left of the canvas area. Click the Fill
tool. Click the canvas to fill it with your chosen color.

l 7 Click the Square/Rectangle tool. The


buttons underneath the tools are used to
switch between drawing a filled or hollow
shape. In Scratch 2.0 (top right) it looks
like an unimpressed robot. The buttons for
Scratch 1.4 are shown underneath (right, Above: The tools panel
below). Click the solid rectangle option. and color palette in
Scratch 1.4. They appear
to the left of the canvas.
The Fill tool (in blue) is

17
selected in the toolbox.
The Rectangle is to its
right. The Paintbrush is
on the left end of that
row of tools.

Left: The Paint Editor in


Scratch 2.0. The tools are
shown on the left. The
color palette, fill options
and line options appear
underneath the canvas.
Magic Mirror

...cont’d

l 8 Pick a color for the carpet and use the Rectangle tool to
draw it. To draw a rectangle, click in the top left corner of
your shape, hold down the mouse button and drag to the
bottom right. Refer to the picture on page 17 to get an
idea of how big to make it, and where to put the mirror
Always make sure you’re and buttons later.
adding your scripts to
the right sprite. Click the
sprite in the Sprite List
before adding a script to
be sure.
l 9 We need to change how thick the mirror’s frame is, by
changing the size of the brush used to draw it. In Scratch
2.0, move the slider underneath the Fill options to the
right to make the line thicker. In Scratch 1.4, click the
Paintbrush tool, then click the brush size menu under the
tools to change the line width. Click the Rectangle tool
and select the hollow rectangle option. Pick the frame
color for your mirror in the color palette and draw the
mirror’s frame on the canvas.

l10
18

Pick the transparent ink. In Scratch 2.0, it is in the top


right of the color palette and it looks like a red diagonal
Wherever the canvas line. In Scratch 1.4, it’s in the bottom right and looks like
shows a checked pattern, a checked pattern. Pick the Fill tool and click inside your
the images behind the frame to fill the frame with the transparent ink.
sprite will be visible.

l11 Pick the Paintbrush tool. Just click in three places,


slightly above the floor, to add three dots. Pick a different
color for each one that isn’t anywhere else in your image
(including the background).

l
Below: Your images in
place. The background 12 In Scratch 1.4, click the OK
shows through the button. In either version,
transparent ink in the click the Scripts tab and
mirror. add the script on the right
to the mirror sprite.

l13 Click the green flag above


the Stage to run this script. It puts the mirror into
position, and you should see the background through it.
Adding the reflection
To make the reflection, we’ll use a copy of the cat sprite. It is
positioned behind the wall, and can only be seen through the
transparent ink of the mirror.

l 1 To start, we’ll make a copy


of the cat sprite, which will
include all its scripts.
Shift + click or right-click
the cat sprite in the Sprite
List. If you’re using Scratch
2.0 online, the right-click
menu doesn’t work, so you
have to hold down the Shift
key and click instead. In
Scratch 1.4 or the offline
version of Scratch 2.0, you can simply right-click. When Below: The information
pane in Scratch 2.0
the menu opens, click duplicate.

l 2 Now we have two identical sprites in the project. This

19
could get confusing so let’s rename one of them. In
Scratch 2.0, click the i button on the sprite in the Sprite
List and the sprite’s name is shown at the top of the
information pane that opens. In Scratch 1.4, click the
sprite in the Sprite List and its name is shown in a dark
box above the Scripts Area. In either case, click the name
to edit it, and change the new sprite’s name to “reflection”.
In Scratch 2.0, click the back button (right)
in the top left of the information pane to go
back when you’ve finished.

l 3 Click your reflection


sprite in the Sprite
List. You need to edit
Below: Try it! Click the
green flag and move the
the green flag script. cat to the mirror.
Change the numbers
in the go to x: y: block
to -160 and -20 so the
reflection appears above
and to the left of your
main sprite. Add blocks to go back 2 layers and clear
graphic effects at the end.
Magic Mirror

Adding the magic controls


Now the mirror’s working, we can add the magic controls.

l 1 Click your original Sprite1 cat in the Sprite List.

It’s getting confusing


now with two cats!
l 2 Click the Sounds tab. In Scratch
2.0, click the tiny speaker icon to
add a new sound. In Scratch 1.4,
Make sure you’re adding
these scripts to your click the Import button. Go into
original Sprite1 cat. the Vocals folder and choose the
Singer2 sound.

l 3 Click the Scripts tab and find the script that starts with
when green flag clicked. Add the rest of the blocks
shown in this script, starting with the forever block.
Inside the forever block is an if block (not an if... else
block). Inside the if block are the broadcast and play
sound blocks. Take care to get the right blocks inside
the right brackets. For the touching color Sensing block,
click the color in it and then click one of the buttons
20

you painted on the wall sprite on the Stage. Broadcasts


enable one sprite to send a hidden message to another.
In Scratch 2.0 on the
Sounds tab, there are big The broadcast block (which is a yellow Control block in
speaker icons too, which Scratch 1.4) has a menu in it. Click the menu and choose
you should ignore. new message and create the message with the name of
the button color. The play sound block also has a menu
on it, which you use to choose the Singer2 effect.

Sounds can only be


played by a sprite they’ve
been added to. If you
can’t find a sound effect
in the play sound block,
check you’ve added it to
that sprite.
...cont’d

l 4 If you’re using
Scratch 2.0
online, hold
down the Shift If the buttons are too
key and click the high for the cat to
if block in your reach, the easiest fix
script. If you’re is to edit the wall and
using Scratch 1.4 mirror image to move
the buttons down.
or Scratch 2.0
Alternatively, you can
offline, right- change the starting y
click the block. position in the go to x:
When the menu y: block in the when
appears, click green flag clicked
duplicate. Drop scripts on the cat and
your duplicated reflection sprites. Make
script underneath it a higher number (for
your if block example -100 instead of
but inside the -120) to move the cat up.

21
forever bracket. Change the touching color block and the
broadcast message for another button, and repeat to set
up all three buttons.

l 5 The broadcast block is sending a message from the main


cat when you jump into one of the buttons. We need to
make the reflection cat respond to it. Click the reflection
cat in the Sprite List, and add the following scripts.
When the reflection receives a broadcast, it will change its
appearance using one of the graphics effects.

The touching color


block will respond if the
cat touches the color,
wherever it is. Don’t use
colors for your buttons
that the cat can walk
into somewhere else on
screen.
Magic Mirror

Polishing the magic mirror


Congratulations! You’ve completed the first project in this book.
Now you can move the cat using the left, right and up arrow keys.
If you jump into a button, it will change the mirror’s distortion
setting, which you’ll see next time you walk in front of it.

You can share your The best way to use this book is not just to make the projects, but
projects on the Scratch also see if you can find ways to adapt them, personalize them and
website so people all improve them. Start by reading the scripts to see if you can work
over the world can enjoy out what they do, and how they work together.
them. Please give credit
to this book if you’re Here are some suggestions for changes you could make:
sharing or adapting its
projects. Thank you! • Get arty. Give the reflection a hat or change its color by
editing the costume for the reflection sprite. You could also
edit the costume for the wall and mirror sprite to draw some
furniture in the room, or a tasteful portrait on the wall.

• More magic. You could add more buttons with different


graphics effects. If you’re a more experienced Scratcher,
perhaps you could try adding new costumes to the reflection
so that the cat can appear as a dragon in the mirror
22

Make sure you save your sometimes. Perhaps you could add a reset button too, to turn
work frequently so you the mirror’s distortion off ?
don’t lose it. Scratch 2.0
online will save work for • More exercise. The jump control uses a repeat 10 block to
move the cat up in small steps, and then move it back down
you automatically from
time to time. In Scratch again. It’s a simple but effective animation. Try experimenting
1.4, use the File menu. with the numbers in this script. Can you make the cat jump
higher, or faster? Can you make the cat furiously kick its legs
as it falls through the air after a jump? You’ll need a next
costume block but you’ll have to figure out where to put it.
You could add different key controls for different styles of
Below: The color effect jumps.
can turn the cat green.
• More rooms. Could you add additional rooms with magic
mirrors in? Design the different room walls as costumes in
the wall and mirror sprite. Use the if block to detect when
the cat’s x position is more than 230 (leaving on the right),
and then change its x position to be on the left (-230 which
would be the position arriving on the left). Use a broadcast
to get the mirror to change to the next costume too. Can you
enable the cat to walk to rooms on the left too? That’s a lot
harder, because there’s no previous costume block.

You might also like