1 of 29

Lower Elementary

Computer Science

Pages: Frog Tap to Jump Game

2 of 29

Objective

Students will be able to create a game that moves from one page to the next using “go to page” blocks.

3 of 29

Vocabulary

Page: A scene in a program - each page has a background and characters

4 of 29

Vocabulary

Loop: A piece of code that repeats commands

5 of 29

6 of 29

Alternative Book Option

7 of 29

Introduction to Pages

8 of 29

Pages have information and tell stories.

9 of 29

Books, websites, and video games can have pages.

10 of 29

You can create a program with up to 4 pages.

11 of 29

Each page has its own background and characters.

12 of 29

How can you move between pages?

The "go to page" block tells a character or object to switch to a different page or scene in the project.

13 of 29

The "repeat forever" block is a never-ending loop that keeps making something happen over and over in your project until you stop it.

We will use “repeat forever” blocks!

14 of 29

Guided Practice

15 of 29

Create a game to make the frog jump to catch a fly when tapped.

16 of 29

Login to Code HS

Select the “Pages: Frog Tap to Jump” project

Choose your teacher icon

Choose your name

Choose your picture password

1

2

3

4

SLIDESMANIA.COM

17 of 29

Add 2 more pages and backgrounds to your project so the frog can “go off to see the world”.

Delete the Tic sprite from each page

18 of 29

Add a frog and a fly to each page.

Move them to their starting places on each page

19 of 29

Program the fly to move back and forth forever!

Change the numbers to get the fly all the way across the page.

20 of 29

Program the frog to hop when it is tapped

Change the number to get Scout to jump higher!

The bigger the number, the higher it jumps. (This number doesn’t mean it jumps 9 times)

21 of 29

Program a second algorithm for the frog to switch to page two when bumped!

22 of 29

Independent Practice

23 of 29

Program the frog and the fly on each page using these blocks

24 of 29

Example Code

25 of 29

Extensions

26 of 29

On scene 2, make the level more challenging by making the fly move faster.

  • Move back and forth forever.

27 of 29

On scene 3, make the level more challenging by making the frog move back and forth forever

  • Move back and forth forever.

  • Hop when tapped.

  • Go to page 3 when bumped.

28 of 29

Showcase!

29 of 29

Reflection

Do you think adding pages can make a program more fun? Why?

What is one challenge you had and how did you approach it?