Premium Features

Download Video

How to Code: Collision Detection — Part I

Published 7 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.

Comments

Want to participate?

Create a free Chris Courses account to begin

Login

No comments yet, be the first to add one

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.