Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Creative Coding with Scratch

Pancake Flip Game


Getting Started

Draw or upload a backdrop of a kitchen and


rename it ‘Kitchen’.

Draw or upload a frying pan sprite, rename


it ‘Frying Pan’. Include a small red coloured
circle in the centre and resize as needed.

Draw a pancake sprite, rename it ‘Pancake’


and resize as needed.

Top Tip: Use go to front layer block to make


sure the Pancake is at the front of the Stage.

Challenge 1
Can you make the Pancake move at an angle and bounce when it touches the edge of
the backdrop?

Challenge 2
Can you make the Pancake flip using Costumes and bounce back when it touches the
red circle on the Frying Pan?

Challenge 3
Can you make a scoring system so that a point is scored every time the Pancake is
flipped by the Frying Pan?

Challenge 4
Can you set the starting position of the Frying Pan?

Challenge 5
Can you make the Frying Pan move left and right when arrow keys are pressed and if on
edge, bounce?

Page 1 of 4 visit twinkl.com


Creative Coding with Scratch Pancake Flip Game

I can:

create or upload a backdrop and sprite;


make a sprite go to the front layer;
make a sprite bounce when it touches the edge of the backdrop;
change the Costume of a sprite to make it flip;
make a scoring system;
set the position of a sprite;
make a sprite move on an axis when arrow keys are pressed.

Page 2 of 4 visit twinkl.com


Helpful Hints
Pancake Flip Game
Use these hints to help you complete the challenges. They will not give you the
complete solution to the algorithm but should help you on your way.

The following code belongs on the Pancake sprite:

To make a sprite go
go to layer
to the front layer of
the Stage:

To make a sprite move at an angle and bounce when it touches


an edge of the backdrop:

forever turn 30 degrees if on edge, bounce

move 10 steps

To make a sprite flip and bounce back when touching part of another sprite:

if then touching color ?


Costumes

turn 180 degrees


Top Tip:
Create a second costume for
the Pancake to change to when switch costume to
it touches the Frying Pan,
making it flip. next costume

Page 3 of 4 visit twinkl.com


Helpful Hints Pancake Flip Game
The following code belongs on the Pancake sprite:

if then touching color ?

To make a scoring
system: change Score by 1

set Score to 0

The following code belongs on the Frying Pan sprite:

To set the starting


when clicked go to x: 0 y: -90
position of a sprite:

To make a sprite move left and right when keys are pressed and if
on edge, bounce:

if on edge, bounce
when clicked
forever

key left arrow pressed?

change x by -5

if then if then
key right arrow pressed?

change x by 5

Page 4 of 4 visit twinkl.com


Creative Coding with Scratch
Pancake Flip Game Answers
Each Creative Coding Challenge is an open-ended task, which can be approached in
many different ways. Pupils should be encouraged to have a go and tackle these tasks
independently. The helpful hints are not intended to provide complete solutions but may
serve as useful cues for supporting less-confident coders. The following algorithms are just
one possible solution to each challenge.

Challenge 1 Challenge 2

The following code belongs on the The following code belongs on


Pancake sprite: the Pancake sprite:

Page 1 of 2 visit twinkl.com


Creative Coding with Scratch Pancake Flip Game Answers

Challenge 3 Challenge 4

The following code belongs on The following code belongs on the


the Pancake sprite: Frying Pan sprite:

Challenge 5

The following code belongs on the


Frying Pan sprite:

Page 2 of 2 visit twinkl.com

You might also like