HTML5/Javascript game engine JS file