HTML5/Javascript game prototype