Тёмный

How 2D Game Collision Works (Separating Axis Theorem) 

Skeffles
Подписаться 812
Просмотров 6 тыс.
50% 1

I recently added Separating Axis Theorem to my game engine, which is an approach for working out 2D collision.
Thanks to my colleagues for listening to an early draft of this video.
Resources
Shapes on a Grid: www.bbc.co.uk/bitesize/topics...
Vectors: • Vectors - Equation of ...
Unit Vectors: • Vectors : Unit Vectors...
Vector Dot Product: • Vectors : Scalar or Do...
Dot Product Proof: • Shortest distance of a...
Contents
0:00 Hello
0:38 Separating Axis Theorem
1:28 Basic Rectangle Checks
2:26 Rotated Rectangles
3:08 Misaligned Rotations
4:07 Finding Axes
5:02 Other Shapes
5:31 Circles
6:01 Concave Shapes
6:22 Summary

Игры

Опубликовано:

 

27 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 41   
@PixelBlight
@PixelBlight 19 дней назад
The visuals made it click for me! Such simple but elegant solution . Im guessing it works the same in 3D but with Vector3 normals
@TonsOfHunStudios
@TonsOfHunStudios 2 года назад
Very well explained! The graphic/animation work was excellent as well. I by know means can re-explain it as good as you did, but it's interesting to see how it's all just a matter of somewhat basic vector math layered on top of each other. Would love to see more content like this in the future :)
@Skeffles
@Skeffles 2 года назад
Thanks Garrett! I'm glad you enjoyed the video. I will definitely look to do more similar stuff soon.
@yordangrigorov6399
@yordangrigorov6399 4 месяца назад
Thank you! I find your pace of explaining perfect.
@GamesBySaul
@GamesBySaul 2 года назад
Hype! Glad to see your videos again! :D Found this really interesting and easy to follow, looking forward to more like this!
@Skeffles
@Skeffles 2 года назад
Thanks Saul! I'm glad it was easy to follow along.
@KalevaPoincare
@KalevaPoincare 2 года назад
Great video with simple explanations for a relatively complex topic.
@Skeffles
@Skeffles 2 года назад
Thanks Kaleva! I'm glad you think so.
@TylerGreen
@TylerGreen 2 года назад
This is very interesting. I'd be curious to see one for 3D game collisions although I imagine it'd be a lot more complex. Looking forward to the future devlogs!
@Skeffles
@Skeffles 2 года назад
Thanks Tyler! I'm also curious about 3D collisions. I believe you can do a similar approach with separating planes but it has more quirky situations that don't quite work.
@RobinSeibold
@RobinSeibold 2 года назад
Great video, both the explanation and visuals! Keep it up!
@Skeffles
@Skeffles 2 года назад
Much appreciated Robin!
@AspiringHeroGames
@AspiringHeroGames 2 года назад
It's always interesting to see how the maths works in the background to do all this stuff. Good on you for doing the calculations yourself!
@Skeffles
@Skeffles 2 года назад
Yes it's super interesting. Thank you for watching!
@GingerNingerish
@GingerNingerish 2 года назад
Very informative good job. Increadible editing too, very well presented!
@Skeffles
@Skeffles 2 года назад
Thank you Ginger. I'm glad you liked it!
@FawltyPlay
@FawltyPlay 3 месяца назад
This is a really high quality video; I'm shocked it only has 3k views as it was the first result when searching.
@TheShelfman
@TheShelfman 2 года назад
This is quite complicated, but very well explained! Nice job😁
@Skeffles
@Skeffles 2 года назад
Thank you Shelf! 😊
@tauheedgamedev2388
@tauheedgamedev2388 2 года назад
Great video mate, I always wondered how the magic happened in game engines and now I'm a little wiser
@Skeffles
@Skeffles 2 года назад
Thanks Tauheed! I'm glad you learnt something.
@valentineDev
@valentineDev 2 года назад
interesting video! you explain it really well!
@Skeffles
@Skeffles 2 года назад
Glad you think so. Thanks Valentine!
@coobbyo
@coobbyo 2 года назад
Good video! I remember collisions being confusing when I first made games in C++
@Skeffles
@Skeffles 2 года назад
Thank you! They definitely are confusing and daunting when you first come across them.
@ZJShepherd
@ZJShepherd 3 месяца назад
Fantastic, thank you!
@microdavid7098
@microdavid7098 2 года назад
nice. Great explanations
@Skeffles
@Skeffles 2 года назад
Thank you David!
@gendalfgray7889
@gendalfgray7889 Год назад
Usually in games there is bounding boxes, game checks bounding boxes first. If bounding boxes overlap then collision checking starts. To decrease numbers of checks normals that pointing away from collision direction (calculated from bounding boxes) could be ignored.
@Skeffles
@Skeffles Год назад
Yes, games often use bounding boxes to help improve their performance, especially when they have lots of complex polygons.
@PixelBlight
@PixelBlight 19 дней назад
Not just bounding box but axis aligned bounding box (aabb) making it even faster!
@jmgames6628
@jmgames6628 2 года назад
Interesting video! The sound quality didn't seem the best though, seemed like there was a bit of an echo. I don't remember noticing any issues with the sound in your videos before, but you haven't made one in while of course! Good to see you getting back into it, anyway!
@Skeffles
@Skeffles 2 года назад
Thanks! I'll have to see if I can improve the audio quality.
@jmgames6628
@jmgames6628 2 года назад
@@Skeffles That'd be good, good luck with it!
@Genpaku
@Genpaku 2 года назад
Hey Skeffles long time no see, cool video, I've done something like this to test collisions but never know how it's called.
@Skeffles
@Skeffles 2 года назад
Hey Genpaku, thank you! It's definitely not an easy to find thing when you first start out. I'm hoping this video helps with that.
@Jalecko
@Jalecko 2 года назад
one day, one day i shall make a game with diagonal map colisions
@Skeffles
@Skeffles 2 года назад
Go for it bud!
@gsestream
@gsestream 2 месяца назад
how about just intersections and overlap
Далее
LISA - ROCKSTAR (MV Teaser)
00:10
Просмотров 9 млн
I Built a SECRET McDonald’s In My Room!
36:00
Просмотров 6 млн
In Video Games, The Player Never Moves
19:21
Просмотров 460 тыс.
Convex Polygon Collisions #1
36:40
Просмотров 126 тыс.
Why Stairs Suck in Games... and why they don't have to
11:24
Soft Body Physics Explained
10:47
Просмотров 530 тыс.
Collision Detection (An Overview) (UPDATED!)
7:27
Просмотров 32 тыс.
When Optimisations Work, But for the Wrong Reasons
22:19
WHAT ARE "TIGHT" CONTROLS? - Movement in Games
9:14
Просмотров 346 тыс.
How Collisions Work in Games
5:54
Просмотров 198 тыс.
Games Where You're NOT the Main Character
14:52
Просмотров 1,7 млн