top of page

FlappyMations

Screenshot 2025-05-09 221427.png

This ‘Flappy Bird’-adapted game uses AI image recognition to let players control the bird's movement with their nose, dodging obstacles to score points. Press space to eat a muffin & change the bird’s color, or adjust the speed using the slider at the start for a customized experience!

About the game

Basically flappy bird but you control with your nose through AI Image Recognition, an extension on Pictoblox!

How I created it

Built in PictoBlox, this innovative project uses AI to identify human pose and human hand landmark points from the camera. The Human Body Detection extension uses the PoseNet model to detect key points, one of which is the user's nose. The bird was then programmed to follow the y-position of the detected nose, allowing you to steer the bird through obstacles, earning points! 

​

Math calculations were done to add the speed function using the user’s input via a slider, and broadcasting, “repeat until”, and “pick random” were used to get the obstacles to appear at the right time at random heights. To give it an element of surprise, the player can change the bird’s colour and eat some muffins too! This program is designed to be interactive and features Mathematics (speed)! 

​

Click on this link to find out more about Human Body Detection: https://ai.thestempedia.com/extension/human-body-detection/

Please feel free to download my code to try my project out on PictoBlocks!

https://drive.google.com/file/d/1v8KDSguXPONz5ca7YQxYS73h1IlkszTz/view?usp=drive_link

Why I created this game

Being one of my favourite games, I always wondered how this game of timing and focus was made, and finally found out in a coding workshop I participated in during the June holidays! After the workshop, I decided to add more to the game to make it more fun, adding sound effects, a point system, the speed slider, different bird designs, the muffin, and more. Unlike traditional Flappy Bird games, this version adds a special twist — Body Part Recognition, an AI extension on PictoBlox! Players control the bird with their nose’s x position, and can even change the bird’s colour and eat muffins by pressing the spacebar! 


Players can personalise it to their playing levels further by adjusting the playing speed with a slider before the game starts, which inputs information into a variable that determines the speed at which obstacles move in the game. This adjustment helps tailor the level of difficulty according to the player's preferences. To achieve this, I programmed the obstacles to move left (negative value) by changing their x position based on the user input. At the same time, a random y position within a certain range would be picked, making the gaps appear at different heights.


To enhance user experience while maintaining clarity in the slider's range (1-100), I divided the speed variable by 10 before setting it as the amount to move left by. This division allows for a more suitable speed setting without complicating the control mechanism. Hence, the final adjustment for the obstacles’ x position is calculated using the formula: [-1 * (speed/10)]. This ensures that players can easily understand and manipulate the speed settings, leading to an engaging and customizable gaming experience! The floor also moves according to when one of the floor sprites reach the end of the screen to simulate motion of the bird flying through the air. 


As for the bird changing colours, this was made possible through the character changing to the next costume whenever the spacebar was pressed, along with a bite taken out of the muffin! The muffin is one of my favourite things to add in any project, and I included it in this one as a fun add-on. Using a similar method to the bird sprite (changing to the next costume), I duplicated costumes of the muffin and used the eraser to simulate “bites” being taken out from it.


In a nutshell, making this project was a fun and engaging experience for me, and it was very fulfilling to see the Math concepts I learnt in school applied in this game. I hope you have as good a time playing it as I did making it, and all the best! 

©2025 by Elizabeth. Proudly created with Wix.com

bottom of page