Javascript broser game using HTML5 Canvas