Code.org SessionPlan#6(1 4)
Code.org SessionPlan#6(1 4)
org
LESSON 6:
Flappy Bird Game
Warm - up
(05 mins)
What is an event?
Event is an action that causes something to happen or that triggers other
actions.
Problem Statement
Once upon a time in the colorful land of Codeville, there was a little bird named
Flappy who dreamt of soaring through the sky. Flappy was determined to become
the best flying bird in the world, and he knew that he needed to practice hard to
achieve his goal.
One sunny morning, Flappy discovered a mysterious portal that led to the Code
Kingdom. Inside, he met an enthusiastic and wise coding instructor named Alex.
Alex told Flappy that he could teach him how to fly through obstacles and
become a true Flappy Bird champion using code.
3
Solution
Excitedly, Flappy began his coding lessons. Alex showed him how to use the
various code blocks in a fun platform provided by Code.org. They started with the
basics of making Flappy fly up and down with simple commands like "flap" and
"fall" and completed the Flappy bird game.
4
Variable
Variable:
A variable is like a container that holds a value, like a number or a word. You can change
what's inside the container, or "variable", as needed. Think of it like a labeled box where you
can put different things inside, change what's inside, or take things out whenever you need
to.
Example:
Your lunch box is like a variable! Your Mom puts food in it, which is like assigning a value to
the variable. And when you're hungry, you eat the food, which is like using the value of the
variable. And just like your Mom adds more food the next day, you can change the value of
the variable by assigning a new value to it. It's a convenient way to store and keep track of
things, just like your lunch box!
Variable
VARIABLE
*student reply*
1. https://studio.code.org/s/course4/lessons/6/levels/1
2. https://studio.code.org/s/course4/lessons/6/levels/2
3. https://studio.code.org/s/course4/lessons/6/levels/3
4. https://studio.code.org/s/course4/lessons/6/levels/4
5. https://studio.code.org/s/course4/lessons/6/levels/5
6. https://studio.code.org/s/course4/lessons/6/levels/6
7. https://studio.code.org/s/course4/lessons/6/levels/7
8. https://studio.code.org/s/course4/lessons/6/levels/8
9. https://studio.code.org/s/course4/lessons/6/levels/9
Solution of Artist:
Variables Puzzles
Puzzle Puzzle
1 2
Puzzle Puzzle
3 4
Answer Key
Puzzle 5 Puzzle
6
Puzzle Puzzle
7 8
Answer Key
Puzzle 9
Flappy Bird Puzzles
Before we jump onto some more puzzles, let’s revise the concepts of events
and variables.
I'll give you the names of some variable and you have to guess the values
inside them! Just like a surprise, but with words. Let's see how good you are
at guessing!
Variables Values
Fridge Food
Bag Books
Purse Money
School Students
Shoe Rack Shoes
Instructions for Teacher
Events: When we have an event there should an action that follows the
event.
Let’s see what action can trigger the event.
Event Action
Switch off the lights Go to bed
Open the door Go out
Switch on the T.V. Watch T.V.
1. https://studio.code.org/flappy/1
2. https://studio.code.org/flappy/2
3. https://studio.code.org/flappy/3
4. https://studio.code.org/flappy/4
5. https://studio.code.org/flappy/5
6. https://studio.code.org/flappy/6
7. https://studio.code.org/flappy/7
8. https://studio.code.org/flappy/8
9. https://studio.code.org/flappy/9
Flappy Bird Game
● Set Player: You can choose the type of the player you want to flap.
● Set Scene: You can set the game scene according to your choice.
● Set Speed: You can set the speed of the player.
● Set Obstacle: You can choose the type of obstacle to want the flappy bird
to cross or pass through.
● Set Ground: You can set the ground of the game according to your choice.
● Set Gravity: Gravity is the force that pulls something to the ground. All of
us stand on the Earth because of Earth’s gravity, else we would all be flying
in the air. By setting this parameter with a value we can determine how fast
the flappy bird will come down.
● Set Gap: You can set the gap between two obstacles. To make your game
difficult, you can make lesser gap.
Coding of Flappy Bird Game
Assignment Assignment
Wrap - Up
32