Thursday, May 22, 2008

AS3 Blitting and Collision Detection Revised

I started to edit my original post on Blitting and Collision Detection but then realized it may be more helpful to maintain the discussion and faulty logic to show progression. You can see the original post here.

In the comments of the previous post, Al has pointed out the importance of math based collisions before rendering. I completely agree that would be the ideal scenario, but I also did not want to sacrifice complex character animations and be restricted to geometry in order to do so. Jeff Fulton (8bitRocket) has come to the rescue by pointing me to one of his Asteroid tutorials which shows how to calculate collisions using just the bitMapData and a reference point indicating where the bitmap will be on the screen. Please read his tutorial here. So far, that seems like the best solution. I don't have to restrict myself to geometry and I can still complete math based collision detections before rendering the objects to the screen.

Thank you Al, Jeff, and Jesse for your helpful advice. I'll keep posting on my progress and please keep the constructive criticism/advice coming. If you would like to see how I came to this point, please read the previous post as well as the helpful comments from Al.

No comments: