Lower Elementary
Computer Science
Pages: Frog Tap to Jump Game
Objective
Students will be able to create a game that moves from one page to the next using “go to page” blocks.
Vocabulary
Page: A scene in a program - each page has a background and characters
Vocabulary
Loop: A piece of code that repeats commands
Alternative Book Option
Introduction to Pages
Pages have information and tell stories.
Books, websites, and video games can have pages.
You can create a program with up to 4 pages.
Each page has its own background and characters.
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.
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!
Guided Practice
Create a game to make the frog jump to catch a fly when tapped.
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
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
Add a frog and a fly to each page.
Move them to their starting places on each page
Program the fly to move back and forth forever!
Change the numbers to get the fly all the way across the page.
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)
Program a second algorithm for the frog to switch to page two when bumped!
Independent Practice
Program the frog and the fly on each page using these blocks
Example Code
Extensions
On scene 2, make the level more challenging by making the fly move faster.
On scene 3, make the level more challenging by making the frog move back and forth forever
Showcase!
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?