Flappy Beard [Day 1] – Introduction

Welcome to another development journal, this time covering the making of a Flappy Bird clone. Since the original game is very simple to develop, I’ll try to make this journal as detailed as possible. All of the original game features will be explained followed with many screenshots.

This project is also developed completely in my free time when I’m not spending time with my family or watching the World Cup. Since the original game is developed in a couple of days, I’ve set also a deadline to make things more interesing. I’ll try to finish the game in only 24 (twenty four) hours during the next seven days. I’m not completely sure if I’m going to use the original graphics, but what I know for sure is that the main character will have a beard, so the name of the game will be: Flappy Beard.

Let the game making fun begin…

When I was starting my last project which is also a 2D game, I couldn’t decide which drawing technique shall I use, Canvas drawing or OpenGL. So I’ve spent again a little bit of time reading articles related to 2D graphics on Android. OpenGL is very fast, hardware accelerated, but the effort to create all the polygon drawing and texturing routines is giving me headaches, especially when it comes to a small project like this. I didn’t want also to run into further dilemmas should I use OpenGL version 1 or 2, so I’ve decided to explore drawing to Canvas.

After further research I’ve found out that the best way is to use the SurfaceView which is a simple view that runs in a separate thread and it’s also hardware accelerated from Android 3.0+ versions. I’ve created the project, setup the view and added also methods for passing touch events to the view. To test if everything is working correctly I’ve drawn a little circle on the screen which you can move around by touching the view. Yey – my first 2D game for Android using Canvas. To avoid any obsolete drawing, calculating or resource leaking, the second thing that every developer implements is the FPS (frames per second) counter in the upper left corner of the screen. Android maximum framerate is 60 frames per second.

* * * * *