-
Collision Detection (An Overview) (UPDATED!)
In this video, I go over the basics of collision detection, going over the differences between both broad vs narrow phase and AABB vs SAT. This video is actually a remake of a video I made back in March, which is now unlisted, but still available to watch if you want to.
Original video: https://youtu.be/xmIlXGx5MsU
I'm still working on the interactive demo on my website, but I figured I'd rather just release the video before it's finished rather than delaying it further. I'll try to finish it soon!
TABLE OF CONTENTS:
• (0:00) Intro
• (0:43) Broad vs Narrow Phase
• (1:31) AABB Collision Detection
• (3:35) SAT Collision Detection
• (5:45) Solid Objects
CORRECTIONS:
• (1:23) Correction: AABB is usually classified as a broad phase method, and is often used in conjunction with SAT. (Thank...
published: 13 Nov 2021
-
Building Collision Simulations: An Introduction to Computer Graphics
Collision detection systems show up in all sorts of video games and simulations. But how do you actually build these systems? Turns out that the key ideas behind these systems show up all over a field of computer science called computer graphics.
We start off with the basics of animation and then branch off into ideas in discrete and continuous collision detection. We break them down in the context of some simple simulations of a small number of particles, but scaling up these simulations is another challenge entirely. We present big ideas in broad phase optimization schemes for speeding up collision detection including the sweep and prune algorithm, uniform grids, K-D trees, and bounding volume hierarchies.
0:00 Introduction
1:25 Intro to Animation
2:46 Discrete Collision Detection and...
published: 19 Jan 2021
-
How 2D Game Collision Works (Separating Axis Theorem)
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: https://www.bbc.co.uk/bitesize/topics/zy72pv4
Vectors: https://youtu.be/0HvfuK5wS30
Unit Vectors: https://www.youtube.com/watch?v=0tRmS04-gg0
Vector Dot Product: https://youtu.be/5XVFQix8tAk
Dot Product Proof: https://youtu.be/ZbcZTpd0VBI
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
published: 17 Apr 2022
-
BSP Trees: The Magic Behind Collision Detection in Quake
An explanation of how Quake, and other games like it, use this revolutionary data structure to stop the player from walking through walls and falling through the ground.
Music Credits:
----
Guiton Sketch by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/by/4.0/
Source: http://incompetech.com/music/royalty-free/index.html?isrc=USUAN1100473
Artist: http://incompetech.com/
----
Pioneers by Audionautix is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/by/4.0/
Artist: http://audionautix.com/
----
0:00 Intro
0:33 BSP tree warm-up
3:21 Tracing a line
6:20 Tracing a box
8:05 Outro
published: 02 Apr 2023
-
Visualizing Collision Detection -- Separating Axis Theorem Explained with a Minecraft Datapack
I describe and visualize the Separating Axis Theorem, and how to use it to detect and resolve collisions between oriented boxes.
Datapack CBScript Source: https://github.com/SethBling/cbscript/blob/master/Scripts/separating_axis_demo.cbscript
SethBling Twitter: http://twitter.com/sethbling
SethBling Twitch: http://twitch.tv/sethbling
Music: "Cipher"
Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0
http://creativecommons.org/licenses/by/3.0/
published: 20 Mar 2024
-
How to Code: Rectangular Collision Detection with JavaScript
Learn web development with 117+ additional tutorials only at https://chriscourses.com 🚀
Rectangular collision detection is a must-know when it comes to video game development. It's a way to tell when two objects touch, so you can call some sort of reactionary event in return, such as gaining a power-up, or ending the game. Here I'll show you how rectangular collision detection works from a high-level perspective, then walk you through how to implement the effect using HTML canvas and JavaScript.
0:00 - How it works
2:07 - Detection on the x-axis
6:40 - Detection on the y-axis (with x-axis)
published: 16 Nov 2021
-
Collision Detection in AAA Games
Have you ever found yourself running into an invisible wall or gotten trapped on a small ledge? That's your video game's Collision Detection acting up. We got some help from someone in the industry to bring some light on the subject.
Wulff Den T-Shirt Store: http://shrsl.com/?~8fv7
BustedTees: http://shrsl.com/?~9546
Twitter [Bob]: http://twitter.com/bobwulff
Twitter [WulffDen]: http://twitter.com/thewulffden
Instagram: http://instagram.com/thewulffden
Facebook: http://facebook.com/wulffden
Twitch: http://twitch.tv/wulffden
Destiny's The Taken King Controversy: https://youtu.be/hoYXjYbR9iU?list=PLc3r8OvpITM7g8LLYnufVYlSaDg54fRgO
Dealing With Backlog: https://youtu.be/Idmm0FAACcY?list=PLc3r8OvpITM5eMn-_94M4Ipzx4xpiVgPl
SUBSCRIBE TO US: http://www.youtube.com/user/WulffDen?sub_confirm...
published: 06 Jul 2015
-
Quadtrees: Blazingly Fast Collision Detection
#gamedev #gamedevelopment #2d #coding
Detecting collisions can be done by going through each object for each object, but that'd be fairly slow. A beautiful and efficient way is using quadtrees.
Sound at the end: Noah Barger – Piano Tune.mp3
Demonstration link on GitHub: kul-sudo/quadtrees
published: 07 Sep 2024
-
Only Rs 7,999 BEST entry level Dual Channel dash cam. 70mai Dash Cam A200 #70mai #dashcam
Unveiling the 70mai A200 HDR Dual Dash Camera: Your Guardian on the Road - In the bustling world of road adventures, the 70mai A200 HDR Dual Dash Camera emerges as your trusty companion, equipped with cutting-edge features to ensure unparalleled safety and clarity. Packed with 1080P HDR front and rear recording, Night Owl Vision, MaiColour Vivid+, G-Sensor, App Playback & Share, and optional Parking Monitoring, this device stands as a second pair of vigilant eyes for your vehicle.
Buy here - https://amzn.to/3Zh8AhB
In the realm of automotive safety, the 70mai A200 HDR Dual Dash Camera takes the spotlight with its remarkable features designed to elevate your driving experience. Priced at an attractive Rs. 7,999 in India, this advanced dash cam offers a comprehensive solution for your on-...
published: 30 Nov 2024
-
How Collisions Work in Games
Here's a short overview on how hitboxes and collisions work. Might talk about a few more optimization tricks in future videos!
New game dev videos out every Monday!
New gameplay videos out (usually) every Wednesday and Friday:
https://www.youtube.com/channel/UC0lqOJRkJg_9bm3bMI89ryA
Check out this article on advanced collisions: http://www.gamasutra.com/view/feature/131598/advanced_collision_detection_.php?page=3
Follow me on Facebook: https://www.facebook.com/thehappiecat
Or Twitter: twitter.com/TheHappieCat
published: 05 Jan 2016
7:27
Collision Detection (An Overview) (UPDATED!)
In this video, I go over the basics of collision detection, going over the differences between both broad vs narrow phase and AABB vs SAT. This video is actuall...
In this video, I go over the basics of collision detection, going over the differences between both broad vs narrow phase and AABB vs SAT. This video is actually a remake of a video I made back in March, which is now unlisted, but still available to watch if you want to.
Original video: https://youtu.be/xmIlXGx5MsU
I'm still working on the interactive demo on my website, but I figured I'd rather just release the video before it's finished rather than delaying it further. I'll try to finish it soon!
TABLE OF CONTENTS:
• (0:00) Intro
• (0:43) Broad vs Narrow Phase
• (1:31) AABB Collision Detection
• (3:35) SAT Collision Detection
• (5:45) Solid Objects
CORRECTIONS:
• (1:23) Correction: AABB is usually classified as a broad phase method, and is often used in conjunction with SAT. (Thanks to @landru27 for pointing this out!)
• (1:43 and 3:39) Clarification: This doesn't mean AABB can't be used on objects that aren't non-rotated rectangles; it's relatively easy to wrap any object in an axis-aligned bounding box for the purposes of AABB. The tradeoff of doing this is that the results of the test won't be completely accurate (since the bounding box will contain some amount of empty space), which is why it may be desirable to use SAT or another method after using AABB to narrow it down. (Thanks again to @landru27)
SOURCES:
• (1) SAT StackExchange post cited in video
https://gamedev.stackexchange.com/questions/43873/how-does-the-sat-collision-detection-algorithm-work
• (2) Continuation of the post cited above
https://gamedev.stackexchange.com/questions/43855/how-do-i-get-the-axes-for-sat-collision-detection
• (3) AABB explanation by Mozilla
https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection
• (4) Explanation of SAT & the math behind it
https://www.sevenson.com.au/actionscript/sat/
• (5) Further explanation of both methods
https://studiofreya.com/3d-math-and-physics/simple-aabb-vs-aabb-collision-detection/
• (6) Broad phase methods & explanations
https://research.ncl.ac.uk/game/mastersdegree/gametechnologies/physicstutorials/6accelerationstructures/Physics%20-%20Spatial%20Acceleration%20Structures.pdf
• (7) More about the broad phase
https://developer.nvidia.com/gpugems/gpugems3/part-v-physics-simulation/chapter-32-broad-phase-collision-detection-cuda
MUSIC:
• (0:00 - 3:33) Dustforce OST - Baryogenesis
• (3:35 - 6:45) Dustforce OST - Cider Time
• (Outro) DM Dokuro - raincloud’s slumber
SOFTWARE:
• Audio Recording: Audacity
https://www.audacityteam.org/
• Screen Recording: OBS
https://obsproject.com/
• Image Editing: GIMP
https://www.gimp.org/
• Video Editing: HitFilm Express
https://fxhome.com/express
https://wn.com/Collision_Detection_(An_Overview)_(Updated_)
In this video, I go over the basics of collision detection, going over the differences between both broad vs narrow phase and AABB vs SAT. This video is actually a remake of a video I made back in March, which is now unlisted, but still available to watch if you want to.
Original video: https://youtu.be/xmIlXGx5MsU
I'm still working on the interactive demo on my website, but I figured I'd rather just release the video before it's finished rather than delaying it further. I'll try to finish it soon!
TABLE OF CONTENTS:
• (0:00) Intro
• (0:43) Broad vs Narrow Phase
• (1:31) AABB Collision Detection
• (3:35) SAT Collision Detection
• (5:45) Solid Objects
CORRECTIONS:
• (1:23) Correction: AABB is usually classified as a broad phase method, and is often used in conjunction with SAT. (Thanks to @landru27 for pointing this out!)
• (1:43 and 3:39) Clarification: This doesn't mean AABB can't be used on objects that aren't non-rotated rectangles; it's relatively easy to wrap any object in an axis-aligned bounding box for the purposes of AABB. The tradeoff of doing this is that the results of the test won't be completely accurate (since the bounding box will contain some amount of empty space), which is why it may be desirable to use SAT or another method after using AABB to narrow it down. (Thanks again to @landru27)
SOURCES:
• (1) SAT StackExchange post cited in video
https://gamedev.stackexchange.com/questions/43873/how-does-the-sat-collision-detection-algorithm-work
• (2) Continuation of the post cited above
https://gamedev.stackexchange.com/questions/43855/how-do-i-get-the-axes-for-sat-collision-detection
• (3) AABB explanation by Mozilla
https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection
• (4) Explanation of SAT & the math behind it
https://www.sevenson.com.au/actionscript/sat/
• (5) Further explanation of both methods
https://studiofreya.com/3d-math-and-physics/simple-aabb-vs-aabb-collision-detection/
• (6) Broad phase methods & explanations
https://research.ncl.ac.uk/game/mastersdegree/gametechnologies/physicstutorials/6accelerationstructures/Physics%20-%20Spatial%20Acceleration%20Structures.pdf
• (7) More about the broad phase
https://developer.nvidia.com/gpugems/gpugems3/part-v-physics-simulation/chapter-32-broad-phase-collision-detection-cuda
MUSIC:
• (0:00 - 3:33) Dustforce OST - Baryogenesis
• (3:35 - 6:45) Dustforce OST - Cider Time
• (Outro) DM Dokuro - raincloud’s slumber
SOFTWARE:
• Audio Recording: Audacity
https://www.audacityteam.org/
• Screen Recording: OBS
https://obsproject.com/
• Image Editing: GIMP
https://www.gimp.org/
• Video Editing: HitFilm Express
https://fxhome.com/express
- published: 13 Nov 2021
- views: 42140
28:05
Building Collision Simulations: An Introduction to Computer Graphics
Collision detection systems show up in all sorts of video games and simulations. But how do you actually build these systems? Turns out that the key ideas behin...
Collision detection systems show up in all sorts of video games and simulations. But how do you actually build these systems? Turns out that the key ideas behind these systems show up all over a field of computer science called computer graphics.
We start off with the basics of animation and then branch off into ideas in discrete and continuous collision detection. We break them down in the context of some simple simulations of a small number of particles, but scaling up these simulations is another challenge entirely. We present big ideas in broad phase optimization schemes for speeding up collision detection including the sweep and prune algorithm, uniform grids, K-D trees, and bounding volume hierarchies.
0:00 Introduction
1:25 Intro to Animation
2:46 Discrete Collision Detection and Response
5:50 Implementation
6:50 Discrete Collision Detection Limitations
8:10 Continuous Collision Detection
11:42 Two Particle Simulations
13:13 Scaling Up Simulations
15:42 Sweep and Prune Algorithm
19:05 Uniform Grid Space Partitioning
20:43 KD Trees
23:51 Bounding Volume Hierarchies
27:12 Recap
Correction: At 9:02, the linear interpolation equations should be x(t) = t * x(1) + (1 - t) * x(0) and y(t) = t * y(1) + (1 - t) * y(0). All subsequent derivations have the x(0) switched with x(1). All y(0) should also be switched with y(1) for the same reason.
Post-correction 2: I ran the experiment with the naive solution of checking every pair of particles with an added inefficiency in rendering the animations so the comparison wasn't fair and that's why the number was so high. The actual speed up is still fairly significant, but not THAT significant.
Minor correction: p.vel is updated and used in the next line at 6:28, p.vel and p.pos should be updated simultaneously
This video is supported by a community of Patreons
Special Thanks to the following Patreons:
Burt Humburg
Justin Hiester
Michael Nawenstein
Richard Wells
Zac Landis
Support: https://www.patreon.com/reducible
Twitter: https://twitter.com/Reducible20
This video wouldn't be possible without the open source library manim created by 3blue1brown: https://github.com/3b1b/manim
Here is link to the repository that contains the code used to generate the animations in this video: https://github.com/nipunramk/Reducible
2D Collision Response Vector Equation Derivation Walkthrough: https://www.vobarian.com/collisions/2dcollisions2.pdf
Bounding Volume Hierarchy Traversal Algorithm for Broad Phase: https://thegeneralsolution.wordpress.com/2011/12/13/broad-phase-collision-detection-bounding-volume-hierarchies-1/
The ideas and presentation in this video were inspired by a culmination of resources -- here are some that I found particularly nice for further exploration:
https://www.toptal.com/game/video-game-physics-part-ii-collision-detection-for-solid-objects
Game Physics Engine Development by Ian Millington Ch. 12
https://github.com/mattleibow/jitterphysics/wiki/Sweep-and-Prune
http://www.mcihanozer.com/tips/computer-graphics/collision-detection-related/uniform-grid-based/
https://wn.com/Building_Collision_Simulations_An_Introduction_To_Computer_Graphics
Collision detection systems show up in all sorts of video games and simulations. But how do you actually build these systems? Turns out that the key ideas behind these systems show up all over a field of computer science called computer graphics.
We start off with the basics of animation and then branch off into ideas in discrete and continuous collision detection. We break them down in the context of some simple simulations of a small number of particles, but scaling up these simulations is another challenge entirely. We present big ideas in broad phase optimization schemes for speeding up collision detection including the sweep and prune algorithm, uniform grids, K-D trees, and bounding volume hierarchies.
0:00 Introduction
1:25 Intro to Animation
2:46 Discrete Collision Detection and Response
5:50 Implementation
6:50 Discrete Collision Detection Limitations
8:10 Continuous Collision Detection
11:42 Two Particle Simulations
13:13 Scaling Up Simulations
15:42 Sweep and Prune Algorithm
19:05 Uniform Grid Space Partitioning
20:43 KD Trees
23:51 Bounding Volume Hierarchies
27:12 Recap
Correction: At 9:02, the linear interpolation equations should be x(t) = t * x(1) + (1 - t) * x(0) and y(t) = t * y(1) + (1 - t) * y(0). All subsequent derivations have the x(0) switched with x(1). All y(0) should also be switched with y(1) for the same reason.
Post-correction 2: I ran the experiment with the naive solution of checking every pair of particles with an added inefficiency in rendering the animations so the comparison wasn't fair and that's why the number was so high. The actual speed up is still fairly significant, but not THAT significant.
Minor correction: p.vel is updated and used in the next line at 6:28, p.vel and p.pos should be updated simultaneously
This video is supported by a community of Patreons
Special Thanks to the following Patreons:
Burt Humburg
Justin Hiester
Michael Nawenstein
Richard Wells
Zac Landis
Support: https://www.patreon.com/reducible
Twitter: https://twitter.com/Reducible20
This video wouldn't be possible without the open source library manim created by 3blue1brown: https://github.com/3b1b/manim
Here is link to the repository that contains the code used to generate the animations in this video: https://github.com/nipunramk/Reducible
2D Collision Response Vector Equation Derivation Walkthrough: https://www.vobarian.com/collisions/2dcollisions2.pdf
Bounding Volume Hierarchy Traversal Algorithm for Broad Phase: https://thegeneralsolution.wordpress.com/2011/12/13/broad-phase-collision-detection-bounding-volume-hierarchies-1/
The ideas and presentation in this video were inspired by a culmination of resources -- here are some that I found particularly nice for further exploration:
https://www.toptal.com/game/video-game-physics-part-ii-collision-detection-for-solid-objects
Game Physics Engine Development by Ian Millington Ch. 12
https://github.com/mattleibow/jitterphysics/wiki/Sweep-and-Prune
http://www.mcihanozer.com/tips/computer-graphics/collision-detection-related/uniform-grid-based/
- published: 19 Jan 2021
- views: 484357
7:29
How 2D Game Collision Works (Separating Axis Theorem)
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 earl...
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: https://www.bbc.co.uk/bitesize/topics/zy72pv4
Vectors: https://youtu.be/0HvfuK5wS30
Unit Vectors: https://www.youtube.com/watch?v=0tRmS04-gg0
Vector Dot Product: https://youtu.be/5XVFQix8tAk
Dot Product Proof: https://youtu.be/ZbcZTpd0VBI
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
https://wn.com/How_2D_Game_Collision_Works_(Separating_Axis_Theorem)
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: https://www.bbc.co.uk/bitesize/topics/zy72pv4
Vectors: https://youtu.be/0HvfuK5wS30
Unit Vectors: https://www.youtube.com/watch?v=0tRmS04-gg0
Vector Dot Product: https://youtu.be/5XVFQix8tAk
Dot Product Proof: https://youtu.be/ZbcZTpd0VBI
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
- published: 17 Apr 2022
- views: 11115
8:53
BSP Trees: The Magic Behind Collision Detection in Quake
An explanation of how Quake, and other games like it, use this revolutionary data structure to stop the player from walking through walls and falling through th...
An explanation of how Quake, and other games like it, use this revolutionary data structure to stop the player from walking through walls and falling through the ground.
Music Credits:
----
Guiton Sketch by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/by/4.0/
Source: http://incompetech.com/music/royalty-free/index.html?isrc=USUAN1100473
Artist: http://incompetech.com/
----
Pioneers by Audionautix is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/by/4.0/
Artist: http://audionautix.com/
----
0:00 Intro
0:33 BSP tree warm-up
3:21 Tracing a line
6:20 Tracing a box
8:05 Outro
https://wn.com/Bsp_Trees_The_Magic_Behind_Collision_Detection_In_Quake
An explanation of how Quake, and other games like it, use this revolutionary data structure to stop the player from walking through walls and falling through the ground.
Music Credits:
----
Guiton Sketch by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/by/4.0/
Source: http://incompetech.com/music/royalty-free/index.html?isrc=USUAN1100473
Artist: http://incompetech.com/
----
Pioneers by Audionautix is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/by/4.0/
Artist: http://audionautix.com/
----
0:00 Intro
0:33 BSP tree warm-up
3:21 Tracing a line
6:20 Tracing a box
8:05 Outro
- published: 02 Apr 2023
- views: 102127
4:52
Visualizing Collision Detection -- Separating Axis Theorem Explained with a Minecraft Datapack
I describe and visualize the Separating Axis Theorem, and how to use it to detect and resolve collisions between oriented boxes.
Datapack CBScript Source: https...
I describe and visualize the Separating Axis Theorem, and how to use it to detect and resolve collisions between oriented boxes.
Datapack CBScript Source: https://github.com/SethBling/cbscript/blob/master/Scripts/separating_axis_demo.cbscript
SethBling Twitter: http://twitter.com/sethbling
SethBling Twitch: http://twitch.tv/sethbling
Music: "Cipher"
Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0
http://creativecommons.org/licenses/by/3.0/
https://wn.com/Visualizing_Collision_Detection_Separating_Axis_Theorem_Explained_With_A_Minecraft_Datapack
I describe and visualize the Separating Axis Theorem, and how to use it to detect and resolve collisions between oriented boxes.
Datapack CBScript Source: https://github.com/SethBling/cbscript/blob/master/Scripts/separating_axis_demo.cbscript
SethBling Twitter: http://twitter.com/sethbling
SethBling Twitch: http://twitch.tv/sethbling
Music: "Cipher"
Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0
http://creativecommons.org/licenses/by/3.0/
- published: 20 Mar 2024
- views: 93100
11:11
How to Code: Rectangular Collision Detection with JavaScript
Learn web development with 117+ additional tutorials only at https://chriscourses.com 🚀
Rectangular collision detection is a must-know when it comes to video ...
Learn web development with 117+ additional tutorials only at https://chriscourses.com 🚀
Rectangular collision detection is a must-know when it comes to video game development. It's a way to tell when two objects touch, so you can call some sort of reactionary event in return, such as gaining a power-up, or ending the game. Here I'll show you how rectangular collision detection works from a high-level perspective, then walk you through how to implement the effect using HTML canvas and JavaScript.
0:00 - How it works
2:07 - Detection on the x-axis
6:40 - Detection on the y-axis (with x-axis)
https://wn.com/How_To_Code_Rectangular_Collision_Detection_With_Javascript
Learn web development with 117+ additional tutorials only at https://chriscourses.com 🚀
Rectangular collision detection is a must-know when it comes to video game development. It's a way to tell when two objects touch, so you can call some sort of reactionary event in return, such as gaining a power-up, or ending the game. Here I'll show you how rectangular collision detection works from a high-level perspective, then walk you through how to implement the effect using HTML canvas and JavaScript.
0:00 - How it works
2:07 - Detection on the x-axis
6:40 - Detection on the y-axis (with x-axis)
- published: 16 Nov 2021
- views: 55024
4:45
Collision Detection in AAA Games
Have you ever found yourself running into an invisible wall or gotten trapped on a small ledge? That's your video game's Collision Detection acting up. We got s...
Have you ever found yourself running into an invisible wall or gotten trapped on a small ledge? That's your video game's Collision Detection acting up. We got some help from someone in the industry to bring some light on the subject.
Wulff Den T-Shirt Store: http://shrsl.com/?~8fv7
BustedTees: http://shrsl.com/?~9546
Twitter [Bob]: http://twitter.com/bobwulff
Twitter [WulffDen]: http://twitter.com/thewulffden
Instagram: http://instagram.com/thewulffden
Facebook: http://facebook.com/wulffden
Twitch: http://twitch.tv/wulffden
Destiny's The Taken King Controversy: https://youtu.be/hoYXjYbR9iU?list=PLc3r8OvpITM7g8LLYnufVYlSaDg54fRgO
Dealing With Backlog: https://youtu.be/Idmm0FAACcY?list=PLc3r8OvpITM5eMn-_94M4Ipzx4xpiVgPl
SUBSCRIBE TO US: http://www.youtube.com/user/WulffDen?sub_confirmation=1
----------Brad Hines' blurb on Collision Detection----------
Most AAA titles these days have at least a few issues with collision. As we move forward in quality in games, and with games getting more immersive, collision issues are more and more noticeable to the player. With new gen consoles having more realistic graphics, we're more easily immersed in what we're playing. Anything that reminds us that we're playing a video game will break that immersion, and causes us to have an uncomfortable experience. This is why you see a lot more minimalist UI in newer games - because in theory, more UI means less immersion. Immersion is the key reason why collision issues are so disturbing to a player - if it looks like the character should be able to go somewhere, walk over something, or climb up something, they should. Collision is, however, a complicated system and tends to be different in most game engines, so there are a lot of things that can have an effect on how it interacts with the player character. I'll get into the details below, which will hopefully provide a useful perspective on collision. As a caveat, this is written from a level designer's perspective. There may be programming related details that I'm fuzzy on.
Collision, typically, is how the player character physically interacts with an object or terrain in the world. It can be built in many different ways, but most commonly it is a separate part of a mesh, built specifically to collide with the player. If you have a wall, for example, with a bunch of tiny details such as bricks, piping, windows, and so forth, usually the player collision will be built as a flat plane in front of all the details. This is two-fold: to provide a smooth experience for the player's navigation, and to lessen the burden on the processing of the player's collision. If the engine has to calculate how the player collides with every tiny detail on an object, you'll typically see a pretty drastic effect on the framerate of the game.
You may also have cases such as in third-person games where there is even a separate mesh for camera collision. If you've ever seen the camera suddenly get pushed inside your player character and see their eyeballs and mouth sack, you've likely seen a problem with camera collision. Usually this collision should be closer to the shape of the actual mesh, so that its slightly further away from where the player is colliding with the mesh. This allows the camera to fit between the player and whatever object they're colliding with. This isn't always possible, but it certainly smooths things out when it happens.
Typically, collision is the responsibility of an environment artist or level artist to create. In most cases, a game designer or level designer will also create or modify the collision to better suit the player's experience. If you were to enable the visibility of collision in most linear levels of AAA games, you might see something that looks like a very simple tunnel, whereas the environment appears to be complex. This shows a good example of synergy between art and design - art has provided an immersive environment, while design has provided a smooth experience. This starts to break down when, lets say, you run into an invisible wall in a location where it looks like the player should absolutely be able to go.
(Cont.) It didn't fit: http://bobwulff.tumblr.com/post/123374007353/collision-detection-in-aaa-games
Twitter: http://twitter.com/wangbacca
https://wn.com/Collision_Detection_In_Aaa_Games
Have you ever found yourself running into an invisible wall or gotten trapped on a small ledge? That's your video game's Collision Detection acting up. We got some help from someone in the industry to bring some light on the subject.
Wulff Den T-Shirt Store: http://shrsl.com/?~8fv7
BustedTees: http://shrsl.com/?~9546
Twitter [Bob]: http://twitter.com/bobwulff
Twitter [WulffDen]: http://twitter.com/thewulffden
Instagram: http://instagram.com/thewulffden
Facebook: http://facebook.com/wulffden
Twitch: http://twitch.tv/wulffden
Destiny's The Taken King Controversy: https://youtu.be/hoYXjYbR9iU?list=PLc3r8OvpITM7g8LLYnufVYlSaDg54fRgO
Dealing With Backlog: https://youtu.be/Idmm0FAACcY?list=PLc3r8OvpITM5eMn-_94M4Ipzx4xpiVgPl
SUBSCRIBE TO US: http://www.youtube.com/user/WulffDen?sub_confirmation=1
----------Brad Hines' blurb on Collision Detection----------
Most AAA titles these days have at least a few issues with collision. As we move forward in quality in games, and with games getting more immersive, collision issues are more and more noticeable to the player. With new gen consoles having more realistic graphics, we're more easily immersed in what we're playing. Anything that reminds us that we're playing a video game will break that immersion, and causes us to have an uncomfortable experience. This is why you see a lot more minimalist UI in newer games - because in theory, more UI means less immersion. Immersion is the key reason why collision issues are so disturbing to a player - if it looks like the character should be able to go somewhere, walk over something, or climb up something, they should. Collision is, however, a complicated system and tends to be different in most game engines, so there are a lot of things that can have an effect on how it interacts with the player character. I'll get into the details below, which will hopefully provide a useful perspective on collision. As a caveat, this is written from a level designer's perspective. There may be programming related details that I'm fuzzy on.
Collision, typically, is how the player character physically interacts with an object or terrain in the world. It can be built in many different ways, but most commonly it is a separate part of a mesh, built specifically to collide with the player. If you have a wall, for example, with a bunch of tiny details such as bricks, piping, windows, and so forth, usually the player collision will be built as a flat plane in front of all the details. This is two-fold: to provide a smooth experience for the player's navigation, and to lessen the burden on the processing of the player's collision. If the engine has to calculate how the player collides with every tiny detail on an object, you'll typically see a pretty drastic effect on the framerate of the game.
You may also have cases such as in third-person games where there is even a separate mesh for camera collision. If you've ever seen the camera suddenly get pushed inside your player character and see their eyeballs and mouth sack, you've likely seen a problem with camera collision. Usually this collision should be closer to the shape of the actual mesh, so that its slightly further away from where the player is colliding with the mesh. This allows the camera to fit between the player and whatever object they're colliding with. This isn't always possible, but it certainly smooths things out when it happens.
Typically, collision is the responsibility of an environment artist or level artist to create. In most cases, a game designer or level designer will also create or modify the collision to better suit the player's experience. If you were to enable the visibility of collision in most linear levels of AAA games, you might see something that looks like a very simple tunnel, whereas the environment appears to be complex. This shows a good example of synergy between art and design - art has provided an immersive environment, while design has provided a smooth experience. This starts to break down when, lets say, you run into an invisible wall in a location where it looks like the player should absolutely be able to go.
(Cont.) It didn't fit: http://bobwulff.tumblr.com/post/123374007353/collision-detection-in-aaa-games
Twitter: http://twitter.com/wangbacca
- published: 06 Jul 2015
- views: 8235
2:30
Quadtrees: Blazingly Fast Collision Detection
#gamedev #gamedevelopment #2d #coding
Detecting collisions can be done by going through each object for each object, but that'd be fairly slow. A beautiful and...
#gamedev #gamedevelopment #2d #coding
Detecting collisions can be done by going through each object for each object, but that'd be fairly slow. A beautiful and efficient way is using quadtrees.
Sound at the end: Noah Barger – Piano Tune.mp3
Demonstration link on GitHub: kul-sudo/quadtrees
https://wn.com/Quadtrees_Blazingly_Fast_Collision_Detection
#gamedev #gamedevelopment #2d #coding
Detecting collisions can be done by going through each object for each object, but that'd be fairly slow. A beautiful and efficient way is using quadtrees.
Sound at the end: Noah Barger – Piano Tune.mp3
Demonstration link on GitHub: kul-sudo/quadtrees
- published: 07 Sep 2024
- views: 45158
16:59
Only Rs 7,999 BEST entry level Dual Channel dash cam. 70mai Dash Cam A200 #70mai #dashcam
Unveiling the 70mai A200 HDR Dual Dash Camera: Your Guardian on the Road - In the bustling world of road adventures, the 70mai A200 HDR Dual Dash Camera emerges...
Unveiling the 70mai A200 HDR Dual Dash Camera: Your Guardian on the Road - In the bustling world of road adventures, the 70mai A200 HDR Dual Dash Camera emerges as your trusty companion, equipped with cutting-edge features to ensure unparalleled safety and clarity. Packed with 1080P HDR front and rear recording, Night Owl Vision, MaiColour Vivid+, G-Sensor, App Playback & Share, and optional Parking Monitoring, this device stands as a second pair of vigilant eyes for your vehicle.
Buy here - https://amzn.to/3Zh8AhB
In the realm of automotive safety, the 70mai A200 HDR Dual Dash Camera takes the spotlight with its remarkable features designed to elevate your driving experience. Priced at an attractive Rs. 7,999 in India, this advanced dash cam offers a comprehensive solution for your on-road security.
Dual-Channel Recording for Comprehensive Protection
One of the standout features of the A200 is its ability to achieve dual-channel recording, providing all-around coverage for added security. Like a vigilant companion, it acts as a second pair of eyes for your vehicle, ensuring that every detail is captured with precision.
Capturing Every Detail with HDR
The A200 records in full resolution with HDR, delivering clarity and color accuracy that goes above par. Its 140° wide-angle field of view covers at least three lanes of traffic, capturing more events in each frame. The HDR technology automatically adjusts exposure balance in low-light or high-contrast environments, ensuring that no detail goes unnoticed.
Night Owl Vision for Clearer Night-Time Images
The exclusive 70mai Night Owl Vision technology enhances the dash cam's performance during nighttime. With reduced noise, balanced exposure, and improved glare control, the A200 produces clearer night-time images, making even distant license plates distinguishable. This is complemented by the F2.0 large aperture that brightens up dark scenes.
Proven Lens Performance with FHD
The A200 boasts 1080P 60FPS recording, seizing critical details on the road with exceptional clarity and vividness. The 130° wide-angle field of view ensures that no events are missed, while the F2.0 aperture and high dynamic range capture crucial details in low-light conditions.
G-Sensor for Collision Detection
Equipped with a built-in G-sensor, the A200 can detect sudden shakes or collisions when your car is stationary. It automatically starts recording to capture potential incidents, and in case of a collision, you receive a voice alert upon turning the car back on.
Time-Lapse Recording for Efficient Memory Usage
The time-lapse recording feature allows continuous recording at 1FPS during parking mode, compressing every 30 minutes of video into 1 minute to save memory card space. This ensures faster playback for catching noteworthy events instantly.
APP Control for Seamless Management
The 70mai APP provides seamless control over camera settings, allowing you to manage recording duration, video resolution, G-sensor sensitivity, and more at your fingertips. Connect to the dash cam's built-in Wi-Fi to access real-time footage, take photos, and easily download videos and photos to your phone.
The 70mai A200 HDR Dual Dash Camera redefines on-road security, offering a comprehensive set of features that prioritize your safety. With its dual-channel recording, HDR technology, Night Owl Vision, and user-friendly APP control, it's not just a dash cam; it's your guardian on the road.
#70mai #dashcam
https://wn.com/Only_Rs_7,999_Best_Entry_Level_Dual_Channel_Dash_Cam._70Mai_Dash_Cam_A200_70Mai_Dashcam
Unveiling the 70mai A200 HDR Dual Dash Camera: Your Guardian on the Road - In the bustling world of road adventures, the 70mai A200 HDR Dual Dash Camera emerges as your trusty companion, equipped with cutting-edge features to ensure unparalleled safety and clarity. Packed with 1080P HDR front and rear recording, Night Owl Vision, MaiColour Vivid+, G-Sensor, App Playback & Share, and optional Parking Monitoring, this device stands as a second pair of vigilant eyes for your vehicle.
Buy here - https://amzn.to/3Zh8AhB
In the realm of automotive safety, the 70mai A200 HDR Dual Dash Camera takes the spotlight with its remarkable features designed to elevate your driving experience. Priced at an attractive Rs. 7,999 in India, this advanced dash cam offers a comprehensive solution for your on-road security.
Dual-Channel Recording for Comprehensive Protection
One of the standout features of the A200 is its ability to achieve dual-channel recording, providing all-around coverage for added security. Like a vigilant companion, it acts as a second pair of eyes for your vehicle, ensuring that every detail is captured with precision.
Capturing Every Detail with HDR
The A200 records in full resolution with HDR, delivering clarity and color accuracy that goes above par. Its 140° wide-angle field of view covers at least three lanes of traffic, capturing more events in each frame. The HDR technology automatically adjusts exposure balance in low-light or high-contrast environments, ensuring that no detail goes unnoticed.
Night Owl Vision for Clearer Night-Time Images
The exclusive 70mai Night Owl Vision technology enhances the dash cam's performance during nighttime. With reduced noise, balanced exposure, and improved glare control, the A200 produces clearer night-time images, making even distant license plates distinguishable. This is complemented by the F2.0 large aperture that brightens up dark scenes.
Proven Lens Performance with FHD
The A200 boasts 1080P 60FPS recording, seizing critical details on the road with exceptional clarity and vividness. The 130° wide-angle field of view ensures that no events are missed, while the F2.0 aperture and high dynamic range capture crucial details in low-light conditions.
G-Sensor for Collision Detection
Equipped with a built-in G-sensor, the A200 can detect sudden shakes or collisions when your car is stationary. It automatically starts recording to capture potential incidents, and in case of a collision, you receive a voice alert upon turning the car back on.
Time-Lapse Recording for Efficient Memory Usage
The time-lapse recording feature allows continuous recording at 1FPS during parking mode, compressing every 30 minutes of video into 1 minute to save memory card space. This ensures faster playback for catching noteworthy events instantly.
APP Control for Seamless Management
The 70mai APP provides seamless control over camera settings, allowing you to manage recording duration, video resolution, G-sensor sensitivity, and more at your fingertips. Connect to the dash cam's built-in Wi-Fi to access real-time footage, take photos, and easily download videos and photos to your phone.
The 70mai A200 HDR Dual Dash Camera redefines on-road security, offering a comprehensive set of features that prioritize your safety. With its dual-channel recording, HDR technology, Night Owl Vision, and user-friendly APP control, it's not just a dash cam; it's your guardian on the road.
#70mai #dashcam
- published: 30 Nov 2024
- views: 423
5:54
How Collisions Work in Games
Here's a short overview on how hitboxes and collisions work. Might talk about a few more optimization tricks in future videos!
New game dev videos out every Mo...
Here's a short overview on how hitboxes and collisions work. Might talk about a few more optimization tricks in future videos!
New game dev videos out every Monday!
New gameplay videos out (usually) every Wednesday and Friday:
https://www.youtube.com/channel/UC0lqOJRkJg_9bm3bMI89ryA
Check out this article on advanced collisions: http://www.gamasutra.com/view/feature/131598/advanced_collision_detection_.php?page=3
Follow me on Facebook: https://www.facebook.com/thehappiecat
Or Twitter: twitter.com/TheHappieCat
https://wn.com/How_Collisions_Work_In_Games
Here's a short overview on how hitboxes and collisions work. Might talk about a few more optimization tricks in future videos!
New game dev videos out every Monday!
New gameplay videos out (usually) every Wednesday and Friday:
https://www.youtube.com/channel/UC0lqOJRkJg_9bm3bMI89ryA
Check out this article on advanced collisions: http://www.gamasutra.com/view/feature/131598/advanced_collision_detection_.php?page=3
Follow me on Facebook: https://www.facebook.com/thehappiecat
Or Twitter: twitter.com/TheHappieCat
- published: 05 Jan 2016
- views: 201225