top of page

Flappy Bird

LT: I can create a scrolling game. I can use sprite sheets to create animations. I can use a game manager to control the game and restart. I can create a menu for my game. I can create animations from sprites. I can use the animator to add different animations to my sprite. I can use the coding to make my character animations flap and die. I can create a repeating background. I can spawn several objects repeatedly. 

Screen Shot 2022-04-19 at 9.21.34 AM.png
Screen Shot 2022-04-20 at 1.45.42 PM.png
Screen Shot 2022-04-19 at 9.17.40 AM.png

Flappy Bird was a very popular game and many games are based on the same idea. Students will either recreate the game or make their own version of the game in this lesson.

Screen Shot 2022-04-04 at 1.00.25 PM 1.png
ColumnSprite.png
Anchor.png
Hook.png
GrassThinSprite.png
BirdHero.png
underwater.png
ground.png
Ground tile.png
sprite fish.png
In this project you will need to create the following sprites. 
  • Background: Sky with Clouds or space or water, something that fits with idea.  Make sure edges match for a seamless transition.​
​
​
​
​
​
​
  • Ground: A tile that can be repeated for the player to land on and die or a full length ground.
​
​
​
​
​
​
​
​
​
​
​
  • Player: Create a 3 sprite player. 1 sprite for up, 1 sprite for rest, 1 sprite for dead.
​
​
​
​
​
​
​
​
​
​
  • Obstacle: this will be used for the player to fly through. You can create one and duplicate it to flip and place on top, or you can create an obstacle with a whole that the player flies through
  •  
LT: I can work with Sprite Sheets to create characters and animations
In many games, game designers will use sprite sheets. Sprite sheets allow the designer to use less computer memory when creating their game. The sprite sheet or tile sheet is added once and used over and over again compared to having to find multiple images.
Create your new project and save on the computer (preferably the desktop or documents).  Make sure to have your assets ready to import.
LT: I can work with layers to create a background.
Do not change the size of the ground when you add it into the game. Do not change the size of the collider on the x scale either. You can change it on the y scale. Later on in the game, this will be an issue if you change the size. Make all other assets fit the ground.
LT: I can use the sprites to create animations for my character. I can create parameters to say when to use the animations.
Students will learn how to create animations using the slices they made from the sprite sheet in the previous steps. In the animation window, they will create an Idle, Move and Die Animation. Then students will create parameters for when to use these animations
LT: I can add in colliders and physics to make my character collide with the ground.
Students will add in a collider and rigidbody to their character as well as a collider to the ground
LT: I can create obstacles for my game.
Students will add in their obstacles for this step of the game using the obstacle they created.

Coding

LT: I can type code to make my player move. I can script to make an object rotate. I can script to keep score. I can script text.

 
This step of the project is what makes the game work. There are many coding languages out there, C++, Java, Python, etc. We will be using C# in either MonoVisuals or Visual Studios depending on the computer. These programs both work the same.
​

As you start this next step, please note -

YOU HAVE TO TYPE IT EXACTLY!

​

If there are any mistakes the game will not work at all, or will not work correctly. Once again, it must BE EXACT!

Now, with all of that being said, if your game doesn't work as it should, go back and rewatch the video until you get it right. Stop and go back to check your script until it does work. This is a key part of making games, persistence. Stay with it until it works. And if that doesn't work, after you have tried all these steps, then ask for help.

9. Code the Player to Move.

LT: I can code movement
Students will type the code using what they learned from the previous project and add to it. This will allow the player to move in all directions.

Camera Follow

Turn in screen recording to Google Classroom.
LT: Add in UI - text for Score and Game Over.
In this step, students will add in the Score text and Game Over text. Then they will add in a text to say "Click to restart". This will allow the player to click their mouse or tap to restart the game.

START CODING THE GAME

LT: I can type code to make my player move. I can script to make an scroll and repeat. I can script to keep score. I can script text.

 
This step of the project is what makes the game work. There are many coding languages out there, C++, Java, Python, etc. We will be using C# in either MonoVisuals or Visual Studios depending on the computer. These programs both work the same.
​

As you start this next step, please note -

YOU HAVE TO TYPE IT EXACTLY!

​

If there are any mistakes the game will not work at all, or will not work correctly. Once again, it must BE EXACT!

Now, with all of that being said, if your game doesn't work as it should, go back and rewatch the video until you get it right. Stop and go back to check your script until it does work. This is a key part of making games, persistence. Stay with it until it works. And if that doesn't work, after you have tried all these steps, then ask for help.

LT: I can add in the player code to make the bird animate and move.
Use the link below to download the Player Code for this game. Once the code is downloaded, watch the video to see how to add the code to the game.
LT: I can create an animation for my player
You will add in animation for this step of the game. Students learned how to create animations in the previous project. This time students will use the record feature to make the sprite change from one to the other.
LT: I can create a game manager to control my game.
This is the first time students will create a Game Manager. This will control the game and reset the game if you collide with an obstacle or hit the ground. It will also add in a Game Over text.
LT: I can code to make an object scroll
Students already added in their obstacles in a previous step of the game.  Then students will add in a scrolling object code to make obstacles scroll across the screen.
LT: I can code to make an object repeat
This step will write code to repeat the background over and over. Remember, you can not change the size of the ground. All assets need to be adjusted for the ground size.
LT: I can code to make the player score points
Using the Game Manager, students will add in a score and a trigger for when their character has passed the trigger.
LT: I can code to make objects spawn using an array.
Spawning or creating a way to repeat the obstacle over and over will be completed in this video. This code is pretty in depth for beginners. If you want to challenge yourself, then watch the video and recreate the code. If it seems too much of a challenge, click on the button below to download or copy the code to add into your game. You will still need to follow along, so you know what steps to complete in the game view and how to add to the other codes.

16. Publish game to Web

LT: I can publish my game
Learn how to publish the game and turn the link into the Padlet

17. Screen Record Game

LT: I can screen record my game.
Learn how to screen record the game to turn in to Google Classroom
bottom of page