Join Paul Trani for an in-depth discussion in this video Detecting collisions, part of Creating a Simple Game for Android Devices with Flash Professional CS5.
Essential to almost any game is going to be collision detection, so determining…when items hit each other or if they go off the screen--some sort of detection…to see where items are at and then giving a result there.…In this case, I need to determine when these UFOs hit the bottom, when they…hit my player, and then also when my lasers hit the UFOs, otherwise known as tempEnemy.…So those are the different sort of collision detections that I need to do.…
All right, and what I am going to do is I am going to go ahead and just have…some trace statements anytime some thing gets hit. You can see I already have…some laser hits the top, so that's a sort of collision detection that's…currently going on.…So let's just go into my Actions panel, and as I scroll down, let's jump into my…player, the movePlayer.…We can see that. And in moveLaser, you can see this trace("laser hits top").…
Well, I really don't need this.…In fact, that's probably going to get in the way, so I'm just going to delete it.…I already know it works; everything is fine.…
Author
Released
2/15/2011- Designing for mobile platforms
- Creating and optimizing game graphics
- Adding random movement and interactivity
- Moving players based on the accelerometer
- Using gestures
- Detecting collisions
- Implementing audio
- Adding scoring and levels
- Implementing a high score screen
- Publishing an app on both Mac and Windows
- Uploading to the Android Market
Skill Level Intermediate
Duration
Views
Related Courses
-
Edge Animate Essential Training
with Chris Converse4h 44m Beginner -
Illustrator CC 2013 One-on-One: Intermediate
with Deke McClelland11h 37m Intermediate
-
Introduction
-
Welcome56s
-
-
1. Introduction to Mobile
-
Understanding the user4m 2s
-
-
2. Mobile Game Setup
-
Reviewing the game1m 50s
-
Reviewing the game structure8m 23s
-
Adding code snippets1m 36s
-
-
3. Basic Game Movement
-
Animating the intro screen8m 13s
-
Moving the player8m 12s
-
Adding enemies6m 49s
-
Adding movement4m 15s
-
Adding chance and randomness8m 42s
-
-
4. Advanced Interactivity
-
Adding lasers8m 14s
-
Detecting collisions7m 57s
-
Adding explosions6m 26s
-
Adding audio3m 3s
-
-
5. Scoring
-
Adding scoring and levels7m 41s
-
Displaying the score6m 57s
-
-
6. Mobile-Specific Functionality
-
Using the swipe gesture4m 42s
-
Using hardware keys5m 53s
-
7. Optimizing for Mobile Devices
-
Handling exits and idle mode3m 31s
-
Optimizing graphics7m 13s
-
Optimizing ActionScript6m 19s
-
-
8. Publishing
-
Creating the app (Mac)5m 5s
-
Creating the app (PC)7m 19s
-
9. Uploading to the Android Market
-
Conclusion
-
Next steps1m 22s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Detecting collisions