Flappy Bird on Pythonista
This started out as a Flappy Bird clone (can be done in under 100 lines of Pythonista), but I let my son do a bit of a redesign. He decided an underwater setting involving an Octopus was much more enjoyable.
The game play and physics are tuned to replicate the original Flappy Bird as closely as possible, so it is hard! If you want to make it a bit more fun for young kids, make the gap larger (Default is 360. 450 is much easier but still a challenge for young kids).
omz last edited by
Love it! Really nice use of the emojis.
pruppert222 last edited by
Cool! Thanks for sharing.
bee18 last edited by
The default tower gap is too narrow. It makes the game alot harder.
It is supposed to be hard. Most players take many tries just to get past the first tower in Flappy Bird. This experiment had the author play 150 times, and still only had a best of 7.
This gist is modelled as closely as possible on the original Flappy bird to the point the the tower gap/width, scroll speed, jump height, gravity etc make playing this game just as frustrating as the original. If you want to make it accessible for kids, increase the gap. But doing for yourself will destroy the Flappy Bird's addictive quality.
bee18 last edited by
Flappy bird is too hard to be an enjoyable game. That's why people love and hate it at the same time. I don't want to get stressed because of this stupid little game. LOL.
I was about to try to make another Flappy Bird clone using Codea/Pythonista. Fortunately, I found your code before I did it. So, instead of making my own, I simply took yours and modify it to my taste. Now, I have my own version of Flappy Bird which I could enjoy playing. It's not as hard as the original Flappy Bird, but it's not too easy as well. With my modification, it's not hard to get score of 10, but it's still pretty hard to get over 20. Now, that's an enjoyable yet challenging simple game. At least to my taste. :)
And, thank you for sharing the code. I really appreciate it.
You're welcome. Glad someone is enjoying it!
My next game is a lot less frustrating and a lot more fun.
ccc last edited by
My particular modification was to make all the graphic elements subclasses of scene.Layer. For the most part it was fairly simple to do and completely eliminated most of the draw() methods. However, I struggled to understand Tower enough to change it. I am glad to hear that the game is nearly impossible to play because I was really unable to build up a high score.
brumm last edited by
Great!!! Thank you.
Sebastian last edited by
Nicely done! Looks a lot better than my version XD
I couldn't decide whether each part of a tower should be it's own object, or if I should aggregate them into one for ease of scoring and collision detection. I went with the aggregate class, but it is probably bad OO design, and it is harder to understand. The Tower class holds 4 Rect()'s. (1 to represent each of the elements of the towers you need to fly through), and then has a draw() function, and an intersects() function for collision detection with the player.
self.upper_tower is a Rect to represent the shaft that starts at the roof self.upper_cap is a Rect to represent the wider 'cap' that sits on the end of the upper tower self.lower_tower is a Rect to represent the shaft that starts at the ground self.lower_cap is a Rect to represent the wider cap that sits on the end of the lower tower
It draws each of the rects to screen manually - not sure how you would convert it to a layer (or layers).
due3die last edited by
Thanks for the game awesome but strange to cross best:2.
Cubbarooney104 last edited by
I was actually working on a flappy bird clone myself (also underwater)! It isn't as nice as yours though (besides, mine is much easier)!
Thanks for the great learning material
Gerzer last edited by
Nice! You inspired me to create a game similar to, yet different from, Flappy Bird. Can't wait to see your next game.
fleech last edited by
Sorry for this dumb question, but how do i copy this code on to my pythonista editor on my iphone to try and execute it? I am a beginner in python and don't know.
dgelessus last edited by
First of all copy the entire script from the site linked above, unfortunately this can sometimes be a little tricky with the iOS text selection. Then open Pythonista, create a new blank script, name it something (like JumpyOctopus), paste the copied code, and finally press play in the upper right.
dozzzl last edited by
fleech last edited by
@dgelessus thanks :D
Butler last edited by
This game might be similar to flappy bird but it is just as much fun and you have the option to fiddle around with it and modify it to your own needs.
Mark last edited by
Bamboo bird is best in my opinion
It has a whole new set of graphics and Game Center which makes it even more addicting
Check out Bamboo Bird on the apple App Store!!!