Summary

You have now tied together the Canvas and animation code along with some new tile and collision detection to build a simple platformer game. In a production game there are a number of places where you could continue to optimize and enhance the engine, including adding in polygon-to-polygon collisions to get more accurate sprite collisions and using a quadtree or a tile-based system to keep the calculations for sprite collisions to a minimum.

Get Professional HTML5 Mobile Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.