A Tiny Game Library

Tangle is my contribution to the growing pile of small, lightweight HTML5 game libraries. It's mostly shared here as an educational effort, in conjunction with the Let's Make a Canvas Library series on my blog, and in accordance with the principles outlined in this presentation I gave at UtahJS in June 2012.


Tangle is built upon the Asynchronous Module Definition API, commonly referred to as AMD. This means that script dependencies are taken care of more or less for free, and we don't need a separate preloading step to bootstrap our JavaScript code for us (other than an AMD-compatible loader, of course).

Tangle leverages some basic cross-browser functionality provided by Atto, my minimal JavaScript library. As some point I may copy those dependent portions of Atto in here to make this library self-contained, but that isn't a priority at this time (remember, this library is educational in nature, not production-ready).

Beyond script module loading, this project aims to provide many of the basic building blocks for making a game (or other interactive experience) in HTML5: sprite sheets and animations, stage backgrounds and viewports, music and sounds, state management, and so on. However, unlike game frameworks such as Impact.js and LimeJS, there's no "one right way" to use Tangle. As such, it's not as easy to get started as with those guys, but instead you get a handful of discrete functional modules to make your coding life easier, and the flexibility to use them however you want.

Available Modules

Currently, the following modules are available and ready for use (examples are hyperlinked where available):

Future Modules

As Tangle continues to evolve, modules will be added as occasion permits. Currently, the following modules are in various stages of planning or development:

It is likely that this module list will evolve over the course of the blog series, so check back often.