In this article we'll implement 2D collision handling using raycasts and axis-aligned bounding boxes. We'll also add jump mechanics and gravity to our previously developed game.
As far as gamedev and HTML5 goes, there are tons of great game engines already out there. How do we pick the right one? Look at the number of stars on GitHub? The number of contributors? The number of published games? If you've looked at the previous articles on this blog, you probably know where this is heading (or read the title for that matter). We're going to write our own game engine first!
Now that we have the game loop, we can build a small wrapper around the HTML5 Canvas API. We'll start with a simple tile based map where each tile is rendered as a colored rectangle.