Premium Features

Download Video

How to Code: Collision Detection — Part I

Published 6 years ago

Collision detection is what tells us when two objects have touched. By reacting to collisions, we can increase a user's score within an HTML5 canvas game, change objects' colors only when they have touched, and even determine when a user's character should take damage.

Part I of this series will cover how to implement collision detection between just two objects, while part II will cover how to code collision detection between multiple objects.

Programming collision detection may seem scary at first, but it becomes exponentially easier with a basic understanding of some rudimentary math. Learn how to code this reactive effect in the latest installment of How to Code.


Want to participate?

Create a free Chris Courses account to begin


No comments yet, be the first to add one

Providing the lift to launch your development career

© 2023 Chris Courses. All rights reserved.