]> git.mxchange.org Git - flightgear.git/blob - docs-mini/README.multiplayer
Merge branch 'ehofman/atc-sound' into next
[flightgear.git] / docs-mini / README.multiplayer
1 The commands are of the form:
2
3 --multiplay=in | out,Hz,destination address,destination port
4 --callsign=a_unique_name
5
6
7 Below are some examples of startup commands that demonstrate the use of the 
8 multiplayer facilities.
9
10 For two players on a local network or across the internet:
11 ----------------------------------------------------------
12 Player1:
13 --multiplay=out,10,192.168.0.3,5500 --multiplay=in,10,192.168.0.2,5501 
14 --callsign=player1
15
16 Player2:
17 --multiplay=out,10,192.168.0.2,5501 --multiplay=in,10,192.168.0.3,5500 
18 --callsign=player2
19
20
21 For multiple players on a local network:
22 ----------------------------------------
23 Player1:
24 --multiplay=out,10,255.255.255.255,5500 
25 --multiplay=in,10,255.255.255.255,5500 --callsign=player1
26
27 Playern:
28 --multiplay=out,10,255.255.255.255,5500 
29 --multiplay=in,10,255.255.255.255,5500 --callsign=playern
30
31 Note that the callsign is used to identify each player in a multiplayer game 
32 so the callsigns must be unique. The multiplayer code ignores packets that 
33 are sent back to itself, as would occur with broadcasting when the rx and tx 
34 ports are the same.
35
36
37 Multiple players sending to a single player:
38 --------------------------------------------
39 Player1:
40 --multiplay=out,10,192.168.0.2,5500 --callsign=player1
41
42 Player2:
43 --multiplay=out,10,192.168.0.2,5500 --callsign=player2
44
45 Player3:
46 --multiplay=out,10,192.168.0.2,5500 --callsign=player3
47
48 Player4 (rx only):
49 --multiplay=in,10,192.168.0.2,5500 --callsign=player4
50
51 This demonstrates that it is possible to have multiple instances of 
52 Flightgear that send to a single instance that displays all the traffic. This 
53 is the sort of implementation that we are considering for use as a tower 
54 visual simulator.
55
56
57 For use with a server:
58 ----------------------
59 Oliver Schroeder has created a server for multiplayer flightgear use.
60 The server acts as a packet forwarding mechanism. When it
61 receives a packet, it sends it to all other active players
62 in the vicinity (the server is configured to use 100nm by default).
63
64 Check out the server homepage <http://www.o-schroeder.de/fg_server/>
65 for the current status. You can either download the server for
66 some local use, or join the developers flying at the existing servers.
67 As with flightgear, the server is free software, released under GPL.
68
69 Pigeon <http://pigeond.net> has created a web page monitoring
70 two such servers, showing the traffic in a Google map environment.
71 See <http://pigeond.net/flightgear/fg_server_map.html>.
72
73 Options needed to enable multiplayer game with a server:
74 Player1:
75 --multiplay=out,10,serveraddress,5002 --multiplay=in,10,myaddress,5002
76 --callsign=player1
77
78 Player2:
79 --multiplay=out,10,serveraddress,5002 --multiplay=in,10,myaddress,5002
80 --callsign=player2
81
82 ...
83
84 PlayerN:
85 --multiplay=out,10,serveraddress,5002 --multiplay=in,10,myaddress,5002
86 --callsign=playerN
87
88 Note that if every player using a particular server, such as one of those
89 listed on the Pigeon's page, needs to have a unique callsign, not
90 already in use on that server.
91
92 If you are sitting behind a NAT'ting firewall, then you need to forward
93 the incoming traffic on the firewall outer (visible to the internet)
94 address arriving at the UDP port you use (5002 in the case above)
95 over to your private LAN address. In this case, use your PRIVATE LAN address
96 as <myaddress>. Example (if your private LAN address is 10.0.0.1,
97 in order to play on pigeond.net):
98
99 fgfs --multiplay=in,10,10.0.0.1,5002 --multiplay=out,10,pigeond.net,5002
100         --callsign=...UNIQUE callsign here...
101
102 If you and the server are in the same address space (i.e., both have a public
103 IP address or both are on the same private LAN), you hopefully don't need to
104 mess with any firewalls.
105
106 If you don't see other players playing on the same server in your flightgear,
107 check that you have followed the above router configuration guidelines.  Check
108 that you don't have any LOCAL firewall running on your computer preventing the
109 flightgear network traffic flow.
110
111 Finally, use ethereal(1) or tethereal(1) to capture the UDP traffic on the port
112 that you are using, and see if you observe both incoming and outgoing packets.
113
114 It's a good idea to talk to the IRC channel #flightgear on irc.flightgear.org
115 while flying on one of the public servers. Also, it makes sense for every user
116 on the same server to use the same weather setup, e.g., the real weather
117 METAR feed, selected by setting to true the real-world-weather-fetch and
118 control-fdm-atmosphere properties.
119
120 Further reading (a must if you have a problem):
121 -----------------------------------------------
122 [1] The flightgear server homepage <http://www.o-schroeder.de/fg_server/>
123 [2] The flightgear wiki multiplayer howto <http://www.seedwiki.com/wiki/flight_gear/flightgear_multiplayer_documentation.cfm>
124 [3] If everything else fails, ask for help on
125 the IRC channel #flightgear on irc.flightgear.org