Pardon the mess, Play My Code is in beta!

READY TO PLAY?
CLICK TO LOG IN!

sign up - lost password

Collisions

Here are a number of functions to help with checking for collisions in games. These allow you to check if a rectangle, line, oval or ellipse overlap.

There are also two collision functions available in the Image class, 'isOverlap' and 'isPixelOverlap'. The latter is used for collisions which are correct to an individual pixel.

isRectOverlap

isLineOverlap

isCircleOverlap

isEllipseOverlap

See Also