Collisions between moving objects

preview_player
Показать описание
A video about how to do collisions between objects, both static and moving ones. I will use pygame to implement it but the logic should work everywhere .

(You also get lots of perks)

Social stuff:

Related videos:

Timestamps:
00:00 - Intro
13:00 - Collision logic
19:32 - Collision implementation

Project file:

Pastebin:
Рекомендации по теме
Комментарии
Автор

Very nice tutorial on basic collisions, but as you said in the end those 2 "bugs" are a pain to fix and I haven't found the optimal way to address it. I am looking foward to a more advanced collision handling video!

APOSTOLARA
Автор

Such a great video. Thanks for being the guy who teaches me collisions! Appreciate it all!

JohnnyGrateful
Автор

You save my life with this tutorial :D

TheBarryLight
Автор

Thank you. My movement method is only linear up, down, left, right. I deployed your collisions function and my sprite is no longer a ghost!

samperry
Автор

Man, your chanel is amazing .

I watch you from Africa

juniorMr
Автор

Thank you so much for this tutorial of such a topic so hard to find. I have been studying this topic for a long time and I had come to, more or less, your same conclusions, although less simply than your brilliant solution. However, I needed to be assured on how to order the object update and draw operations and you helped me a lot about that. Unfortunately I don't use Pyton as a programming language and I miss the implementations of the PyGame library, in particular those on sprites and collision detection between them. It would be particularly interesting to understand how to resolve bitmap collisions between transparent sprites and not just filled rectangular ones, for example. I hope one day you will want to make a tutorial about this too.

dmin
Автор

0:32 That moment that the red block just phases through the green block as it's being pushed by the blue block. I too have this issue with multi collision

WingMaster
Автор

Hi Chris, nice job explaining collisions. Would using Munk be more effective?

TasteDaRDX
Автор

That's why this is a good channel

Thanks
Just tell me can i make fruit ninja with pygame

anantchandak
Автор

Please make a video tutorial on how to create an isometric game, thanks!

Salomon_li
Автор

Hey, absolutely love your work. Do you know of or have any videos which use the built in vector class in Pygame? I think it’s really powerful but can’t find any videos on it. Thanks.

raphaelramesar
Автор

I implemented this in my project and it works well but it isn’t as springy as with static and moving object collision. The player gets slowed when moving in certain areas. Is that just lag or is it fixable?

furykool
Автор

Hey can you plz do a video series on KivyMD
Thanks

kailasmanoj
Автор

Btw, have you ever made a chess game in Python?

SkyFly
Автор

What's that IDE? I'm using Pycharm but the colors doesn't match

trolleandopervertidos
Автор

I am the 525th person to see this video!

George_
Автор

This is bug filled are you going to go more in depth?

ocoolwow