Pygame Tutorial - 13 - Collision Detection

preview_player
Показать описание
In this video we learn how to detect collision between the enemy and the bullet. Also we fix a couple of errors and display score on the console.

Next video - Creating Multiple Enemies


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

Your teaching style is really incredible

surenlama
Автор

1:40
lol distance formula...its been a long time m8 XDXD

rohankushaltorul
Автор

Every video you made started with alright guy😂

rachaelmcdowell
Автор

so underrated this deserves 100, 000 views

bobbysingh
Автор

Sir why used 27 .
Is there any reason for it ?

saisubramanyam
Автор

tnx Bro for ur easy wat.Learned a lot from ur pygame and tcp videos.

mehdibouss
Автор

sir actually we could do it using a easy method !


This is called the colliderect method which is already built-in in pygame ! If you make another video using how to do collision detection using this method means it would be nice !

jeevankumarm
Автор

My bullet image is flickering when fired, how can this problem be removed

anirudhmarutheri
Автор

pycharm says that 'math' is not defined and it wont work. How can I fix this?

sgaming-lo
Автор

How do I completely remove the space invader from the screen? I looked all over the internet and couldn't get it to work.

Master-dysh
Автор

My collision is only working on the right side of the screen and I don't know how to fix it! please help

jemaurlich-howell
Автор

Can anyone help with, finding collision for two diff images shapes, wherever I search I just see everyone making rectangles but I need for image which is a circle and rectangle for ping pong game...its so hard finding the point of contact. Thanks

aneeshmalapaka
Автор

Aab tak sab thik chal raha tha lekin achanak aaj output me black screen aa rahi he...shayad achhe se run nahi ho raha he. Koi error bhi nahi dikha rahi... Please help😣

himanshujoshi
Автор

Ha Im learning this in school so it came just in time

rodrigobaiao
Автор

How can I do so the enemies won't respawn?

littleliska
Автор

Thanks for your tutorials but in this case game making so hard? Or game engines make this thing more easy?

baransjsjsj
Автор

if distance < 27:
^
SyntaxError: invalid syntax can anyone solve this problem?

traumaterasu
Автор

Hello! Great tutorial! What if I wish to make my enemy disappear after the collision? How can I achieve it? Thanks in advance!

sonakshiarora
Автор

My collision is not working and I am not sure why. I wrote almost the same code, just with different images and variable names, and tried playing around with the distance, but it still doesn't seem to be working :( not sure what the issue is, it won't collide or print score. Any help would be greatly appreciated!

Hailey-lsgd
Автор

For those who are wondering why <27 pixel, because the enemy is 27 pixels. Check properties in your image u want as enemy collision's pixel

ryzen
visit shbcf.ru