Rectangular collision detection is a must-know when it comes to video game development. It's a way to tell when two objects touch, so you can call some sort of reactionary event in return, such as gaining a power-up, or ending the game. Here I'll show you how rectangular collision detection works from a high-level perspective, then walk you through how to implement the effect using HTML canvas and JavaScript.