ArcBasicDocs

StartNetGame

Starts or joins a network game.

StartNetGame()

Parameters

None.

Description

Looks for games on the local network and lets the player host a new one or join one found, by its address too, in a small window. Gives back 2 when hosting, 1 when joined, or 0 if the player cancelled or it failed. Start a network game this way, or with HostNetGame or JoinNetGame, before using the other multiplayer commands. On devices that can't show the window, such as phones and tablets, it joins the first game it finds, or hosts one if there is none. Games use TCP port 40500, and UDP port 40501 to find each other on the local network; a firewall may ask to allow them the first time a game is hosted.

See also