Pixel Perfect Collision Detection in C

Channel:
Subscribers:
5,530
Published on ● Video Link: https://www.youtube.com/watch?v=9pnEBa4cy5w



Duration: 2:26
3,694 views
143


Get the code at the text version of this tutorial: https://croakingkero.com/tutorials/pixel_collision_detection/

I'll show you how to detect collisions on a per-pixel basis. Collision *response* is unique to each game, so I'll give an example of that for a 2D platformer in my next video.

Chapters
0:00 Intro
0:11 Creating masks
0:34 Concepts
0:58 No overlap, early out
1:11 Finding the overlap
1:23 Finding the colliding section of each mask
1:39 Comparing each pixel for collision
1:59 Ending