Set up game loop.