canvas creation and game loop