Implement a proper fixed timestep game loop