[Tutorial] 2D grid spatial partitioning basics (speed up collision broad-phase)

Subscribers:
6,290
Published on ● Video Link: https://www.youtube.com/watch?v=7HY_SqqaoL4



Category:
Tutorial
Duration: 7:24
11,798 views
146


[sorry for the audio issues!]
http://vittorioromeo.info/

A grid as a spatial partitioning method is easy to implement and can speed up immensely collision detection.

In this video, I try to explain how it works, how bodies do not have to match the cell size, and a possible implementation.

Check out my implementation at:
https://github.com/SuperV1234/SSVSCollision

The code examples shown in the video are made exclusively for illustrative purposes - they help the viewer understand how everything works, but are in no way functional or well-written.

Addendum video: http://www.youtube.com/watch?v=vYB37BDtHuQ

Interesting resources:
http://en.wikipedia.org/wiki/Space_partitioning
http://www.altdevblogaday.com/2011/02/21/spatial-partitioning-part-1-survey-of-spatial-partitioning-solutions/
http://conkerjo.wordpress.com/2009/06/13/spatial-hashing-implementation-for-fast-2d-collisions/
http://www.gamedev.net/page/resources/_/technical/game-programming/spatial-hashing-r2697
http://buildnewgames.com/broad-phase-collision-detection/
http://howlingmoonsoftware.com/wordpress/collision-detection-and-spatial-indexes/

Outdated articles I've written about collision detection and resolution:
http://veegamedev.wordpress.com/2012/08/14/getting-2d-collisions-right-part-one/
http://veegamedev.wordpress.com/2012/08/14/getting-2d-collisions-right-part-two/







Tags:
vittorio
romeo
open
super
hexagon
source
foss
gamedev
dev
development
programming
game
gaming
spatial
partitioning
video
tutorial
2d
grid
space
algorithm
hash
hashing
collision
detection
resolution
performance
benchmark
stress
test
box2d
farseer
metanet
aabb
Space Partitioning
Collision Detection
Computer
Technology
Software