GameDevL2

Lesson 2: Variables


Programming essentials in Scratch: part I

Computing

Ben Garside

Materials from the Teach Computing Curriculum created by the National Centre for Computing Education

1 / 15
volgende
Slide 1: Slide
newEditorComputingLower Secondary (Key Stage 3)

In deze les zitten 15 slides, met interactieve quizzen en tekstslides.

Dit is niet oké

Onderdelen in deze les

Lesson 2: Variables


Programming essentials in Scratch: part I

Computing

Ben Garside

Materials from the Teach Computing Curriculum created by the National Centre for Computing Education

What is a Sprite?

Define what a variable is

Learn about Input/Process/Output

‹#›

In this lesson you will:

‹#›

Story time

The story that you are about to hear has some words that you will hear a number of times.

Pick what you want these words to be. You MUST remember them:


COUNTRY =

VILLAIN =

TOWN =

SISTER =

HERO =

‹#›

Part 1

In a faraway land called [COUNTRY].

There was a magical and mysterious castle in the town of [TOWN].

It was said that behind the castle walls was a magical princess called [HERO].

[HERO] tried to hide her powers from the people of [TOWN], but there was a curious prince called Prince [VILLAIN] who found out about these powers and forced [HERO] to run away.

‹#›

Part 2

[HERO] ran way, and imposed an endless winter on [TOWN].

Her sister [SISTER] set off on a dangerous adventure to help [HERO] return to [TOWN].

‹#›

Interlude

Our story has moved on to a new TOWN and therefore we are going to change the data that TOWN currently refers to.

TOWN =

‹#›

Part 3

[SISTER] found her way to [TOWN] where her sister had used her magical powers to build a palace of ice.

Along the way, [SISTER] had to overcome many challenges and met a new snowman friend.

‹#›

Interlude

For the end of our story, we need our HERO and SISTER to return back to the original TOWN.

As variables don’t hold more than one item at a time and don’t remember any previous values, make sure the data linked to TOWN is changed again.

TOWN =

‹#›

Part 4

[SISTER] and [HERO] work together to put the nasty [VILLAIN] in jail.

[HERO] and [SISTER] returned to [TOWN] to save [COUNTRY] from an eternal winter.

THE END

‹#›

In the story, what were the variables?

Did any of the variables store more than one item of data at the same time?

1

Yes

2

No

What are the two variables in our code?

MakeCode Arcade

We have learnt the basics of game design in scratch, now its time to move on to something more challenging


Sign in with microsoft and Play through the tutorial of MakeCode Arcade - click here


Extension - Start one of the projects in the yellow box