docs: def _launch_remote(self, host, config_port, race, name, interface):
      """Make sure this stays synced with bin/play_vs_agent.py."""
      self._tcp_conn, settings = tcp_client(Addr(host, config_port))
  
      self._map_name = settings["map_name"]
  
      if settings["remote"]:
        self._udp_sock = udp_server(
            Addr(host, settings["ports"]["server"]["game"]))
  
        daemon_thread(tcp_to_udp,
                      (self._tcp_conn, self._udp_sock,
                       Addr(host, settings["ports"]["client"]["game"])))
  
        daemon_thread(udp_to_tcp, (self._udp_sock, self._tcp_conn))
  
      extra_ports = [
          settings["ports"]["server"]["game"],
          settings["ports"]["server"]["base"],
          settings["ports"]["client"]["game"],
          settings["ports"]["client"]["base"],
      ]
  
      self._sc2_procs = [self._run_config.start(
          extra_ports=extra_ports, host=host, version=settings["game_version"],
          window_loc=(700, 50), want_rgb=interface.HasField("render"))]
      self._controllers = [p.controller for p in self._sc2_procs]
  
      # Create the join request.
      join = sc_pb.RequestJoinGame(options=interface)
      join.race = race
      join.player_name = name
      join.shared_port = 0  # unused
      join.server_ports.game_port = settings["ports"]["server"]["game"]
      join.server_ports.base_port = settings["ports"]["server"]["base"]
      join.client_ports.add(game_port=settings["ports"]["client"]["game"],
                            base_port=settings["ports"]["client"]["base"])
  
      self._controllers[0].save_map(settings["map_path"], settings["map_data"])
      self._controllers[0].join_game(join)