Join Lee Brimelow for an in-depth discussion in this video Overview of collision-detection options, part of Building Flash Games with Starling.
- View Offline
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 detection and you…
Starting with installation and configuration of Starling and creation of a Flash Builder project, the course shows how to prepare and import graphical assets, create MovieClip classes from sprite sheets, manage various gaming objects, detect collisions, and add both particle and sound effects. The finished game can be deployed to any browser or mobile device that integrates Flash Player 11, which was released in September 2011.
- Downloading and installing Starling and Flash Builder
- Creating the project
- Creating the main game class, static assets class, and other classes
- Building the state machine
- Creating a static assets class
- Adding images
- Creating sprite sheets with Texture Packer
- Creating and importing bitmap fonts
- Detecting collisions
- Adding particle effects
- Adding sound effects