2D tile based game framework in HTML5