Creating a Flappy Bird Clone in Python / Pygame
A tutorial on creating the popular Flappy Bird game in python with pygame.
If you want to support me: / clearcode
(You also get lots of perks)
Social stuff:
Twitter - / clear_coder
Discord - / discord
Related videos:
Introduction to Pygame: • The ultimate introduct...
Deltatime: • Understanding framerat...
Masks: • Understanding Pygame m...
Timestamps:
00:00:00 - Intro
00:01:00 - Project setup
00:04:27 - Background creation
00:24:59 - Creating the ground
00:32:57 - Creating the plane
00:55:24 - Creating the obstacles
01:16:39 - Score and game over menu
01:37:18 - Adding sounds
Project files:
github.com/clear-code-project...
Pastebin:
main.py (at the start): pastebin.com/CsKbCZFL
main.py (at the end): pastebin.com/Zz745pW6
settings.py: pastebin.com/dGjjEMUP
sprites.py: pastebin.com/vA43b7bS
Пікірлер: 42
Another great tutorial! Thanks for all the content, my programming journey is off to a fun start because of your work.
Great tutorial, thanks so much. It just goes to show how such a 'simple' game seemingly to the user can still require a lot of thought, consideration and planning for what it is.
This looks great! Thank you for the tutorial! 👍
Amazing video as always! Keep the nice work up! :D
Love your videos. Especially your cloning and ursina. Love to see more of ursina though!!!
Really Nice, video and clean code.
Really neat joke there in 7:51, caught me off guard 🤣
At 1:05:46 is that a new way of creating timers? or should I still use the method you explained in your Creating timers video?
Very good tutorial but can you make a video for the road map of python so that I will not be confused while learning it
Hi , do you use an website to get the animations , or do you make them yourself ? Can you recommend a website for someone who doesn't want to play with Photoshop for example ?
@yourlinuxguy
10 ай бұрын
Hey pal, did you find any of those websites your talking about?
@patrickslomian7423
10 ай бұрын
@@yourlinuxguy hey, nope :(
Hey love your videos! Got a question what's the purpose of the Game class? isn't the same to write that part of the code outside of a class?
@centycebra4447
Жыл бұрын
then you wont be able to use self. and also it makes the code cleaner and easier to access specific parts like if he wrote the rotate and animate code without classes it would be very complex to store all that code in variable because you cant call just some specific code you need to have a var or class for it hopefully you understand it
what codes can i add to create an intro screen?
Pls make vedio on how to convert py files into apk and exe
Is it different video than the one you had unlisted?
omg thanks
You deserve way more views. Honestly I think pygame is just a very niche topic and it’s hurting your growth (not that I mind, but I want you to succeed)
cool
how to fix no module named pygame??
what do you use to code?
@qqlez
2 жыл бұрын
he uses: language: python with pygame module text editor/IDE: sublime
hey can you just make ursina game engine tutorial like you have done for pygame pls this video is too amazing
@qqlez
2 жыл бұрын
he's made 2 ursina tutorials here is the first one: kzread.info/dash/bejne/dnyHtMOPlbTeec4.html
why not in Ursina engine :( ?
please make a metroidvania game
you shouldn't multiply gravity by delta twice
I got an error with the scale factor. full_height = bg_image.get_height () * scale_factor full_width = bg_image.get_width () * scale_factor full_sized_image = pygame.transform.scale (bg_image, (full_width, full_height)) ->TypeError: integer argument expected, got float in line full_sized_image Your github game has also an error. Sorry Game over!
@ClearCode
2 жыл бұрын
I think the issue is that you are running an older version of pygame. If you want to fix it, change the last line to: full_sized_image = pygame.transform.scale (bg_image, (int(full_width), int(full_height)))
@thomaspfaff1074
2 жыл бұрын
@@ClearCode Yes, really. If updated Pygame and now this problem is over. Thank you. It works
@informallogic6388
2 жыл бұрын
@@thomaspfaff1074 No dice! I'm getting a similar issue, TypeError: 'float' object cannot be interpreted as an integer I've attempted full_height_int = math.ceil(full_height) full_width_int = math.ceil(full_width) full_sized_image = pygame.transform.scale(bg_image, (int(full_width_int), int(full_height_int))) ValueError: size needs to be (number width, number height) even full_width_int_doubled = (full_width_int * 2) self.image = pygame.Surface(full_width_int_doubled, full_height_int) ValueError: size needs to be (number width, number height) Fully updated pygame via pip
yoo nice shit ma bui
Ninth 😉
Second
FIRST
third
KSI
@pirachithbastian2452
Жыл бұрын
Pirachith Bastian
@atampreethothi3302
Жыл бұрын
@@pirachithbastian2452 Atampret
The author, please, I'm from Kazakhstan, I seem to have done everything right, but they say that there are no such game = Game () in the images folder. Can I contact you?