refined game loop and landing detection