Learn how to program tile based collision detection and response for your HTML5 game using pure JavaScript with this informative video tutorial. This collision technique uses a three tiered approach to detecting and resolving collision: Broad Phase collision detection, Routing, and Narrow Phase collision response.
Check out the source code on my github page: https://github.com/pothonprogramming/...
Also check out the working example on my website: https://pothonprogramming.github.io/c...