Share My Creation Cloney Bird - libGDX version

Screenshot_2014-03-13-08-26-58.png
I've written the first test version of my Flappy Bird clone using libGDX, this should run much smoother on all devices now.
Please test this and let me know how it runs.
The bird death doesn't work and the score doesn't either. But pipe collisions should work.

I'm not sure why the image isn't showing as the thread preview image, maybe it's because I attached the image by editing the post after first submitting it without the attachment? Can this be fixed???

I've now updated this to support later version of B4A and android and to support higher than 60hz screen refresh rates on devices.
 

Attachments

  • Cloney Bird LibGDX.zip
    105.5 KB · Views: 187
Last edited:

Beja

Expert
Licensed User
Longtime User
Works fine on my Galaxy GT18552 /4.1.2

Thanks for sharing the code
 

ilan

Expert
Licensed User
Longtime User
looks very nice

why is the bird not falling after hit the pipes like in the original??
 

andymc

Well-Known Member
Licensed User
Longtime User
why is the bird not falling after hit the pipes like in the original??
I didn't copy that bit from the accelerated surfaces version, I think I was just having a problem with LibGDX at the time. I could fix that pretty easily. Along with some other things to finish it up, but really I just wanted to use this as a programming lesson. I'll probably add an extra part to the tutorials on my blog that talks about adding finishing touches, like animations on the title screen, having the bird drop when it dies, a high score table, clouds moving in the sky, etc......
 

andymc

Well-Known Member
Licensed User
Longtime User
I'm not sure what version of B4A you need. I think it will work on a pretty low version as it's mainly handled by the libgdx library not b4a.
The libgdx tutorial says it requires Froyo and up Android 2.1 so I wouldn't really worry about requirements as most users will already meet them and unless anyone says something, I'm assuming it will work with all versions of B4A
 

Computersmith64

Well-Known Member
Licensed User
Longtime User

Watch, learn, write code
Thanks Andy. Like a lot of people, I've done a lot of "business" programming, plus of course games like Yahtzee! & have always wanted to get into writing some arcade-style games - so your Cloney Bird code has been an awesome learning tool for me. I'm writing a game that uses a somewhat silly variation of the theme & will share it once it's done.

- Colin.
 

eps

Expert
Licensed User
Longtime User
I've added all eight parts now, the tutorial is complete, and I've included all source code for download.
www.easyandroidcoding.com

When I follow this link I can view Part 5 onwards, but not the 4 that preceded that, it wants me to log in. Is this expected behaviour?
 

andymc

Well-Known Member
Licensed User
Longtime User
Thank you so much for pointing that out EPS, I hadn't noticed as I'm always logged into my blog. I've fixed the links now.
I've been getting a lot of attention due to writing these tutorials. My blog traffic has increase five fold over the last two days. I've also put postings on XDA-developers and gamedev.net to gather more attention to Basic4Android. I want to grow the platform. Right now it's popular with application developers but now games are a real viable option too thanks to libraries like LibGDX.
 
  • Like
Reactions: eps

eps

Expert
Licensed User
Longtime User
I thought that was the reason the links didn't work :) Thanks for sorting it. I'll have to start reading through it all! :)
 

Eran Jesusa

New Member
Licensed User
Longtime User
how can you solve the scoring system? when the bird hits the top of the pipe and then the bird fall down and hit the space in the center of the two pipe and give the additional 1 point in your score even the bird is dead due to hit of the top of the pipe. Can you make the scoring system when the bird only pass to the center of the in between space of the pipe.
 

ilan

Expert
Licensed User
Longtime User
if bird <> dead then score = score +1 (put the scoring process in this "if", thats it...)
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
how can you solve the scoring system? when the bird hits the top of the pipe and then the bird fall down and hit the space in the center of the two pipe and give the additional 1 point in your score even the bird is dead due to hit of the top of the pipe. Can you make the scoring system when the bird only pass to the center of the in between space of the pipe.

I changed it so that you only score a point if you pass completely through the gap in the pipe. I also have a check to see if the bird is dead or alive before allowing it to score a point.

- Colin.
 
Top