The 20 Game Challenge #1: Flappy Bird


For game #1 in The 20 Games Challenge I decided to go with Flappy Bird. My main reason for choosing this game was Pong seemed to be the main project others picked.


Throughout development I used a few tutorials as possible, preferring to figure things out as I went from the docs and community posts. Overall this definitely made it more challenging, however I feel this gave me a greater understanding of each of the components.

Assets

All assets were from the asset pack published by kosresetr55 here on itch.io. For future games I will probably make at least some assets myself, however for my first game I wanted to keep it simple.

Pain points

Collisions. I had several issues with collisions between the player and the pipes, as well as detecting when the player passed through the pipes. The main issue I had was sometimes collisions would work and other times the player would go straight through the pipes.  In the end I believe this came up from how I was instantiating the pipes, however in the end I'm not 100% sure.

Proud moments

My proud moment from this project was figuring out the rotation of the player when moving up/down. I ended up using the vertical velocity multiplied by a constant, then clamped to -45 to 45 degrees. I went through a few iterations of the code, before settling on a one-liner:

$AnimatedSprite2D.rotation_degrees = clampf(linear_velocity.y * 0.09, -45, 45)

0.09 was chosen as this gives 45/-45 degrees at 500/-500 velocity, which is about the highest that would be seen in game play.

Favorite discovery

Signals. Lots of fun to play around with and very easy to loose track of. For a small project like this they were fine to keep track of, however I could easily see myself loosing track of them all very easily in a larger project.


Overall this took 2 days to complete. I'm happy with the time it took, especially considering the final product (in my opinion) feels pretty good. I think there is always more that could be done to make it feel just that little bit better, but for a project like this the diminishing returns are not worth the time investment.

Get Flappy Bird Clone

Leave a comment

Log in with itch.io to leave a comment.