integrate game_loop