Share My Creation Cloney Bird - Flappy Bird clone - source code included

I've put together a simple Flappy Bird clone using the accelerated surface library. It's nothing complicated but was a good exercise for me to play around with making a simple game. I've included the source code for you all to play with if you like. I believe Flappy Bird is the pong of this generation for programmers, it serves as a good example of something you should try to learnt o program to teahc you the basics of setting up a game scene, tracking score, reading and writing a highscore to a file, accepting user input and updating the scene quickly to give smooth graphics.
2014-03-04 08.32.17.png
2014-03-04 08.32.02.png

I want to say a big thanks to Informatix for his help with handling the scaling issues I ran into with this to support different screen sizes.
 

Attachments

  • CloneyBird.zip
    19.9 KB · Views: 4,394
  • result.apk
    153.1 KB · Views: 1,722

andymc

Well-Known Member
Licensed User
Longtime User
There will be an update shortly, there's a couple of bugs I've noticed. Such as the score not resetting after you die. And I think the delay before starting a new game is too long. I also want to add a title screen, sound effects, music, and rotate the sprite for when the bird is climbing or falling just like the real Flappy Bird.
The collision detection is just calculated based on the size of the bitmap for the pipes, I don't think there's any collision detection function in the accelerated surfaces library.
 

enowinner

New Member
Licensed User
Longtime User
thanks for the sourcecode nice word
I've put together a simple Flappy Bird clone using the accelerated surface library. It's nothing complicated but was a good exercise for me to play around with making a simple game. I've included the source code for you all to play with if you like. I believe Flappy Bird is the pong of this generation for programmers, it serves as a good example of something you should try to learnt o program to teahc you the basics of setting up a game scene, tracking score, reading and writing a highscore to a file, accepting user input and updating the scene quickly to give smooth graphics.
View attachment 23221 View attachment 23222
I want to say a big thanks to Informatix for his help with handling the scaling issues I ran into with this to support different screen sizes.
 

ilan

Expert
Licensed User
Longtime User
I have the feeling that soon we will see lots of "Flappy Birds" in the "Share your Creation" forum... :D
 

Douglas Farias

Expert
Licensed User
Longtime User
Sugestion

1- Try fix the lag
2- add in menu a select bird
3- add in menu select map

this is lag on my galaxy o_O
the game works fine but later 5 or 10 seconds, later the pipes come it cause a minimal lag
when you tap for the bird go up it cause lag and u die xD

why this lag? because HARDWARE ACELERATION?
i tested in the T7 tablet and Galaxy Trios

T7 tablet = very very lag , you cant play, game rum but you cant play very very lag
Galaxy Trios = Run fine, have a minimal lag when you tap or see the pipes
 
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User
i m not programer i m begginer, but when u need image, sounds or sites talk with me =)

i make for u 10 maps images here
 

Attachments

  • 1.png
    1.png
    95.9 KB · Views: 974
  • 2.png
    2.png
    43.5 KB · Views: 839
  • 3.png
    3.png
    175.5 KB · Views: 951
  • 4.png
    4.png
    253.2 KB · Views: 970
  • 5.png
    5.png
    257.3 KB · Views: 1,005
  • 6.png
    6.png
    277.6 KB · Views: 944
  • 7.png
    7.png
    131.7 KB · Views: 776
  • 8.png
    8.png
    204.5 KB · Views: 805
  • 9.png
    9.png
    212.7 KB · Views: 804
  • 10.png
    10.png
    206.2 KB · Views: 872
Last edited:

andymc

Well-Known Member
Licensed User
Longtime User
Thanks for all the comments and advice guys. I really just uploaded this as an example to show using the accelerated surfaces library for a real game. I never intended to develop it into a fully fledged game. I do have ideas for a much more advanced game based on the Flappy Bird concept but will most likely be releasing it on the Play Store in a few months time and haven't decided if I will release the source code for that one here or not.

I'm not sure what a T7 tablet is? I did Google it and found reference to a quad core Hyundai tablet which looks like it should run everything fine. My Galaxy Note 10.1 runs it no problem at all. It's not super smooth but then I haven't put much effort into making the framerate smooth. I really just wanted to get the graphics scaled properly and the gameplay working.

Thanks for the background links, but as I'm not developing this much further I won't be needing them. You are alll welcome to use this code to make your own version though.
 

walterf25

Expert
Licensed User
Longtime User
I've put together a simple Flappy Bird clone using the accelerated surface library. It's nothing complicated but was a good exercise for me to play around with making a simple game. I've included the source code for you all to play with if you like. I believe Flappy Bird is the pong of this generation for programmers, it serves as a good example of something you should try to learnt o program to teahc you the basics of setting up a game scene, tracking score, reading and writing a highscore to a file, accepting user input and updating the scene quickly to give smooth graphics.
View attachment 23221 View attachment 23222
I want to say a big thanks to Informatix for his help with handling the scaling issues I ran into with this to support different screen sizes.
this looks even better than the orignal game, i'm actually working on a version myself but with libgdx, i started yesterday but had no idea you had already made this, great job.
 

andymc

Well-Known Member
Licensed User
Longtime User
Hi walter, I did think about using libGDX but decided to start simple, my next aim after this is to make the same thing using libGDX and then andEngine as these are the two other game libraries available for basic4android
 

Douglas Farias

Expert
Licensed User
Longtime User
i think with libGDX or andEngine can remove the lag *-*
 

walterf25

Expert
Licensed User
Longtime User
Hi walter, I did think about using libGDX but decided to start simple, my next aim after this is to make the same thing using libGDX and then andEngine as these are the two other game libraries available for basic4android
it is really easy with libgdx, i started yesterday and i'm almost done with the game, andEngine is not complete, Xv didn't want to continue with it since libgdx came out
 

andymc

Well-Known Member
Licensed User
Longtime User
I was having problems with andEngine, I couldn't find how to specify a main game loop to update everything! LibGDX does look much better. And I think a lot of popular games have already been written using it.

Regarding the performance on lower end CPUs like the Allwinner A10 in cheaper tablets, I'm not that bothered TBH how it runs. It was just a test. My Galaxy S2 is three years old and runs it fine, and that's good enough for me. I don't really keep any low end devices aroudn to test on so I can't do much to ensure things run well on them. I will most likely switch to using LibGDX with B4A from now on though as this looks good. Before then, I've updated my Flappy Bird clone to have sprite rotation for the bird and sound effects.

The link is still the same: https://dl.dropboxusercontent.com/u/8673694/you tube files/basic4android/CloneyBird.zip
 
Last edited:
  • Like
Reactions: eps

holdemadvantage

Active Member
Licensed User
Longtime User
Hi, i tried this code first of all to study libGXD but sometimes on device or emulator , after bird is dead or during the fly the app crash, anyone else has got the same issue?

Edit my fault: i got
Native typeface cannot be made
this because i cannot load ttf from assets every tick of Surface_Draw, this can cause an error
 
Last edited:

walterf25

Expert
Licensed User
Longtime User
Hi, i tried this code first of all to study libGXD but sometimes on device or emulator , after bird is dead or during the fly the app crash, anyone else has got the same issue?

Edit my fault: i got
Native typeface cannot be made
this because i cannot load ttf from assets every tick of Surface_Draw, this can cause an error
You got this same code working on libGDX? :eek:
 
Top