Building a JavaScript-Based Game Engine - for the Web