I think the game loop is good but the current game is very hard. The player has too little time to react to the upcoming obstacles. Additionally, the player doesn't have any indicator that tells them that the scene will change which ended up the player instantly crashing. It would be nice if you add those indicators and increase the camera height.