Skip to content
April 20, 2010 / uglabs

Better Pixel Perfect Collision Detection in AS3

One of my friends on Kongregate has developed their own Pixel Perfect Collision detection method, designed specifically for speed. On average it is around 600ms faster for 10,000 iterations than my gSkinner AS3 port. I highly advise a switch to this method because speed is important in collision detection for irregular objects. You can read more about it on my github page, where I post a sample and source of a simple application that uses this new code

Cheers,

UnknownGuardian

3 Comments

Leave a Comment
  1. Jonathanasdf / Apr 20 2010 10:48 am

    Did you obtain permission from skyboy to distribute this?

  2. uglabs / Apr 20 2010 3:10 pm

    Of course not. But since its on github, a public repository, it has no restrictions on who uses it last I checked. I’ll give a shout to skyboy right now to make sure.

    EDIT: And he says yes, its public, so I can use it.

  3. bfi / Oct 12 2010 6:45 am

    Hi,

    I have some sprites that contain some lines drawn with lineTo moveTo that collide with a movieClip. I’ve tried both classes, the gSkinner port and SkyCollisionDetection but both fail to detect the collisions if I add a glow filter to the container of the line sprites. Any ideas?

    Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.