Python Flappy Bird AI Tutorial (with NEAT) - Pixel Perfect Collision w/ Pygame

preview_player
Показать описание
This python flappy bird AI tutorial will cover creating moving pipes on the screen as well as implementing pixel perfect collision between our birds and pipes. This is an example of using pygame masks to accomplish pixel perfect collision with pygame.

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

Tags:
- Tech With Tim
- Python Tutorials
- AI Plays Flappy Bird
- Python AI Flappy Bird
- Genetic Algorithm
- NEAT Python
- Python NEAT
- Pygame Pixel Perfect Collision

#python #NEATPython #GeneticAlgorithm
Рекомендации по теме
Комментарии
Автор

5:58: "Gimme some slack here 'cause I'm drawing with my mouse"


*procedes to draw PERFECT lines arround the bird and the pipe*

pacgames
Автор

Ngl when I start seeing your videos I don't even want to press back button and close your video until the video ends, thank you so much

jagadishb
Автор

6:50 _"Just to make this look a little bit _*_NEATer_*_ "_
I see what you did there Tim

Aca
Автор

A small point to add regarding the mask discussion. The "pygame.mask.from_surface" is checking where are all the non-transparent pixels in the two images, since that's what the player actually sees. It then checks if those non-transparent elements are colliding or not. That's why, even if the bounding boxes overlap, it's not regarded as a collision unless the content itself is transparent.

AD-oxng
Автор

This series is fantastic! im very much a beginner but this strikes the right balance between being difficult enough to keep me interested and simple enough that i can just about get my head around most of it. Really will made and explained! cant believe this kind of quality lessons is here for free!

Arnogorter
Автор

Hey, awesome tutorial. I'm skipping some parts because I'm more interested in the A.I. part, but for someone into game design, this must be really helpful. Nice job :))

marco.nascimento
Автор

It would be great if you write on caption easier to find us

technoinfoworldwide
Автор

this is an awesome series. Love your videos and I can't wait for the next one :))

ramenspicy
Автор

Im 14 years old and i started learning coding like 1 month ago and i found your videos interesting and they are helping me a lot so first thank you so much but i have to ask you something my laptop isnt working anymore and i need to buy a new one so can you make a video telling us top 5 laptops for coding like a budget one, the best one etc.. Keep up like this You're doing a perfect job helping us. Bye.

omerislami
Автор

I totaly love your videos, the way that you explain is amazing : ) keep it up

kubakakauko
Автор

That flagged whitespace is killing me!!!!

techtutorials
Автор

I really liked your tutorial dude. Great motivation to learn something new

erictronic
Автор

thanks for that masks explanation bit. It was great!

extreme
Автор

the program gives me an error at line 100:
'Pipe' object has no attribute self.set_height().
What should I do?

shujamukhtar
Автор

6:50 "make this look a little bit NEATer" 😀😀😁😁😂😂🤣🤣🤣

justnate-
Автор

Great tutorial. Can't wait to see your next tutorial. ;)

AgentRex
Автор

Why do we need to make boxes around the bird and pipe can't we just check if the masks collided or not?

aygames
Автор

Very good))).Understood everything 👍
Jst wonder if base was symmetrical no need to move it

mrfrozen-despicable
Автор

Hey Tim... start using MSFT Whiteboard... it's so good and way better than paint... just saying ;-)

Gunsi-kbxq
Автор

it seems like the top offset is incorrect, because you really want to calculate the y direction distance from the top pipe lower edge to bird, am I right? it should be:top_offset = (self.x - bird.x, self.height-round(brid.y))

caoxiangxing