0% found this document useful (0 votes)
19 views

Code.org SessionPlan#6(1 4)

Uploaded by

mzmegastorm
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Code.org SessionPlan#6(1 4)

Uploaded by

mzmegastorm
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Code.

org
LESSON 6:
Flappy Bird Game
Warm - up
(05 mins)

Hello, how are you?


Let’s revise what we learned in the previous session.

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

We can say that a variable is a container that holds


a value which can change.

We can say that the lunchbox is a variable and the


food in it is the value and the
value keeps changing (increasing or decreasing).
Value
Student Login

Step 1: Open the link and click on “sign in”.


(Share this link with the students in the comment section).
Link: http://www.studio.code.org

Step 2: To sign in to the platform, enter the section code.


(Share the section code created by you this is session)
Once done, click on the ‘Go’ option to log in.
Instructions for Teachers

In this session three activities will be performed:

1. Artist: Variables Puzzles


2. Flappy Bird Puzzles
3. Flappy Bird Project
Student Login

Step 3: Time to choose your name from the


names listed in the grey boxes.

Step 4: Now, enter the ‘secret words’ as given


by your teacher and type them in the white
box below the instruction: “Now enter your
secret words”.
(Refer to the image attached).
Instructions for Teacher

In this puzzle you get to draw a special kind of

triangle called an "equilateral triangle." Each

side is 100 tiny squares long!

Do you know what makes an equilateral triangle

special? It has something called "exterior

angles" and they are all the same size!

Solution: Can you guess how big they are?

*student reply*

Answer: 120 degrees


Instructions for Teacher

Drag and drop the ‘repeat’ block under


the ‘when run’ block.

Set ‘move forward’ to 100 pixels and the


‘turn left’ by 120 degrees. Then, set ‘repeat’
to 3 times.
Solution:
Instructions for Teacher

In this puzzle you have to draw an equilateral


triangle using the variable ‘length’. The
‘length’ of each side is 150 pixels.

Which block will you use to assign 150 pixels


to the length variable?
*student reply*
‘Set length to 150’ block.

Drag and drop ‘set length’ to 150 under


Solution:
‘when run’.
Place move forward by ‘length’ pixels and
turn left by 120 degrees inside a repeat block
and repeat it 3 times.
10
mins
Student Activity
1 Artist Variables
Puzzles
Activity Link: Artist Variables Puzzles
Activities For Learner

Complete all these puzzles (in accordance to student’s pace):

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

Note: Answers to the ‘Artist variables’ puzzles may


serve as a teacher's guide.
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

Activity Link: Flappy Bird Puzzles


Instructions for Teacher

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.

Do you know what is ‘flap’?

Flap allows a player to jump when you click/tap the image.


Flappy Bird Puzzles

Complete all these puzzles according to the pace of learner:

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

Activity Link: Flappy Bird Game


Flappy Bird Game

Flappy Bird is a very interesting game in


which you have s bird
Which can be controlled using mouse click.

Fly the bird using mouse click, wing sound


will be played.

Bird has to cross the obstacles to score


points.

If Bird touches the obstacle or ground the


game will over.
Coding of 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

When the ‘Run’ button is clicked:


-> Set the player of your choice.
-> Set your favorite background scene.
-> Set an obstacle that the player has to
cross and continue playing the game.
-> Set the gap between the player and
obstacle to normal, large or small.
-> Set the speed of the player either to
normal, high, low, random etc.
Coding of Flappy Bird Game

When we click/tap on the play


area:
-> Flap the player(bird) with the
amount (large, small, high etc).
-> Play the flapping sound.
Coding of Flappy Bird Game

When player hits the ground:


-> Game ends with a sad sound.
When player hits the obstacles:
->Either we can ‘end game’ or
continue
playing, we need to click on ‘when

run’ or set score to 0.


When player crosses the obstacles:
-> Increase player’s score by 1.
-> Play a sound when the player
crosses
the obstacle.
Flappy Bird Game For Learner

Empty project link

Completed project link


Resource Table

Link Activities Links

For learner Project link Artist: Variable Puzzles (1-9)


Flappy Puzzles (1-9)

Assignment Assignment
Wrap - Up

Okay, so here we come to the end of the session. Congratulations! You


did very well in the class today.

How about we revise what we studied today?


● What is an event?
● What are the new blocks you studied
today?
● Which block is set the gravitational pull?
● What is a variable and its value?
WELL DONE! WE WILL TRY TO LEARN MORE
ABOUT CODING IN THE UPCOMING CLASSES.
HAVE A GREAT DAY!
Thank You !

32

You might also like