Creating game when window.onload