dot dot neocities dot org > collision detection

To detect when objects collide each other is obviously important in games. Last experiment was already detecting collisions bewteen the ball and the bounds of the canvas. I wonder how hard it is to detect collisions with oher moving objects. MDN might help. Click to start.

Crash test 1

Your browser doesn't support "canvas"
x: y:

Still not perfect

Your browser doesn't support "canvas"
x: y:

With MDN's help

Your browser doesn't support "canvas"
x: y:

Let's make the second ball move too

Your browser doesn't support "canvas"

Balls party! +

Your browser doesn't support "canvas"