extract game loop from game