Overview of collision-detection options


show more Overview of collision-detection options provides you with in-depth training on Developer. Taught by Lee Brimelow as part of the Building Flash Games with Starling show less
please wait ...

Overview of collision-detection options

So before we go and actually implement collision detection into our game, I wanted to go over a couple of the options which you have for collision detection. So the simplest is called bounding box collision detection and you can see in this example here, I have my alien and I have my hero ship, and essentially, there are rectangles around them that denote the bounds. So anytime I overlap the two, we can see they turn red here. This is the simplest form of collision detection that's actually useful for a lot of things, because remember in our game, the aliens are moving downwards.

So if we want to test between the aliens and the ship, this is actually pretty good, and for the most case since things are moving so fast, this would actually work fairly well. Now obviously, if you had a big graphic that had all kinds of intricate shapes, and you wanted to really test in a more accurate way, then things would break down. But this is the simplest and the fastest way to do collision detect...

Overview of collision-detection options
Video duration: 3m 10s 2h 57m Intermediate

Viewers:

Overview of collision-detection options provides you with in-depth training on Developer. Taught by Lee Brimelow as part of the Building Flash Games with Starling

please wait ...