HTML5 Boilerplate is a simple example of Test Driven game-like behavior implemented in Javascript using a functional object creation model (as described in 'Javascript: the Good Parts, Chapter 5).
The sample contains examples of:
- Keyboard Input
- Mouse Input
- Polygon drawing
- Sprite drawing
- Simple object motion (using an Euler integrator)