Howto:Multiplayer: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
mNo edit summary
(43 intermediate revisions by 12 users not shown)
Line 1: Line 1:
The '''multiplayer''' feature of [[FlightGear]] makes it possible to see other pilots and vice-versa. This makes it possible to fly in formation, perform [[mid-air refueling]] with tankers controlled by real people or contact real [[air traffic control|air traffic controllers]] to ask for guidance.
The '''multiplayer''' feature of [[FlightGear]] makes it possible to see other pilots and vice-versa. This makes it possible to fly in formation, perform [[mid-air refueling]] with tankers controlled by real people or contact real [[air traffic control|air traffic controllers]] to ask for guidance.


Multiplay may cause extreme [[troubleshooting performance issues|framerate drops]] during the loading of aircraft models, especially heavy models such as the [[Boeing 777]] or [[Airbus A320neo]]. It is suggested to fly in locations other than the default [[San Francisco International Airport]], as there are often lots of pilots in the area who are often new, and do not follow ATC, or respect traffic.
Multiplayer may cause extreme [[troubleshooting performance issues|framerate drops]] during the loading of aircraft models, especially heavy models such as the [[Boeing 777]] or [[Airbus A320neo]]. It is suggested to fly in locations other than the default [[San Francisco International Airport]], as there are often lots of pilots in the area who are often new, and do not follow ATC, or respect traffic.
 
== Notes ==
* Callsigns can be a maximum of seven characters.
* You might want to check the [[#Known issues|Known issues]] section.


== Connecting to Multiplayer ==
== Connecting to Multiplayer ==
=== In-sim Dialog ===
=== Built-in launcher and in-sim dialog ===
[[File:Multiplayer settings dialog.jpg|thumb|Multiplayer settings dialog]]
[[File:Multiplayer settings dialog.jpg|thumb|Multiplayer settings dialog]]
The easiest way to get online is to use the in-sim Multiplayer dialog. All you need to do is enter a callsign and select a server from the menu. Press Connect to go online.
The easiest way to get online is to use the [[FlightGear Qt launcher|built-in launcher]] or the in-sim Multiplayer dialog. All you need to do is enter a callsign and select a server from the menu. Press Connect to go online.


{{Note|Before starting tests, you might want to check the [[#Problems associated with specific Internet Service Providers|Problems associated with specific Internet Service Providers]] section.}}
=== Using FGRun ===
 
==== From the main page ====
=== Using the launcher / FGRun ===
[[File:Multiplayer.jpg|thumb|Multiplayer settings in [[FGRun]]]]
[[File:Multiplayer.jpg|thumb|Multiplayer settings in [[FGRun]]]]
# Select your [[aircraft]] and starting airport as normal in [[FGRun]].
# Select your [[aircraft]] and starting airport as normal in [[FGRun]].
Line 17: Line 20:
#* '''Callsign''' of your choice.
#* '''Callsign''' of your choice.
#* '''Hostname:''' Enter <code>mpserverXX.flightgear.org</code> (with <code>XX</code> being the [[#Servers|server number]]).
#* '''Hostname:''' Enter <code>mpserverXX.flightgear.org</code> (with <code>XX</code> being the [[#Servers|server number]]).
#* '''In/out:''' Set both ports to 5000.
#* '''In/Out:''' Set both ports to 5000.
# Click {{button|Run}} and you'll soon be flying with other pilots!
# Click {{button|Run}} to start FlightGear.


To confirm that it's working, you can go to the multiplayer map at http://mpmap02.flightgear.org/ (in Hong Kong). Once FlightGear has started, you will notice chat messages that say "Hello" indicating pilots that are online.  They will also pop up when a pilot jions the MP network.  You can change this message by editing the <code><chat type="string">Hello</chat></code> line in <tt>''[http://sourceforge.net/p/flightgear/fgdata/ci/next/tree/preferences.xml $FG_ROOT/preferences.xml]''</tt>. You may wish to use a different server, especially one closer to you.  
To confirm that it's working, you can go to the multiplayer map at http://mpmap02.flightgear.org/ (in Hong Kong). Once FlightGear has started, you will notice chat messages that say "Hello" indicating pilots that are online.  They will also pop up when a pilot joins the MP network.  You can change this message by editing this line in <tt>''[http://sourceforge.net/p/flightgear/fgdata/ci/next/tree/preferences.xml#l763 $FG_ROOT/preferences.xml]''</tt>:
<syntaxhighlight lang="xml">
<chat type="string" preserve="y">Hello</chat>
</syntaxhighlight>
You may wish to use a different server, especially one closer to you.  


For more advanced settings, the <code>Advanced > Network</code> tab in FGRun can be opened.
==== From Network Settings ====
[[File:FGRun Advanced dialog - Network.png|thumb|The <tt>Network</tt> tab of the Advanced Options dialog in [[FGRun]] (in [[Changelog 3.2|FlightGear 3.2.0]]).]]
You can also change multiplayer settings in the <tt>Network</tt> tab of FGRun's Advanced Options.


=== Using fgfs from the command line ===
# On the last page, click {{button|Advanced}}.
First, for those who are very impatient and have a vague idea about what they're doing, the basic arguments to pass to fgfs for multiplayer are these;
# Click <tt>Network</tt> in the left column.
# In the <tt>Multiplayer Options</tt> area …
#* Type your desired callsign into the box.
#* Set the parameters for the two other boxes; see [[#Using multiplayer from the command line|below]] for correct syntax.
#* Click {{button|OK}}, then run FlightGear.
 
=== Using multiplayer from the command line ===
When running FlightGear from the [[command line]], you can specify multiplayer settings.  The two arguments are as follows:
<syntaxhighlight lang="bash">
--multiplay=direction,10,ip.address,port
--callsign=anything
</syntaxhighlight>


  --multiplay=out,10,server.ip.address,5000
Obviously, <code>--callsign</code> can be anything you wish. There are four arguments to <code>--multiplay</code>:
  --callsign=anything
; direction
: Either <code>in</code> or <code>out</code>. <code>in</code> tells FlightGear to listen to packets of data coming in through the specified '''port'''<code>out</code> tells FlightGear to send data out through the '''port'''.


where 5000 is the port number the server is listening on (which is 5000 for the official servers).
; ip.address
: IP address of network interface being used by FlightGear.  If left blank, FlightGear will listen to all network interfaces.  If '''direction''' is set to <code>in</code>, FlightGear will listen to ''only'' this IP address.


If you for some reason need to specify which local port and/or interface FlightGear should use add the following argument:
; port
: Port that data is either being sent or received through.  Usually set to <code>5000</code> and above.


--multiplay=in,10,your.ip.address,portnumber
== Advanced usage of multiplayer ==
=== Local setup for testing ===
It is possible to set up a local multiplayer network between two FlightGear instances ''without'' using a [[FGMS|multiplayer server]]. All you need to do is map each I/O port of one instance to the corresponding port(s) of the other instance:


where portnumber is usually 5000 and your.ip.address is the ip address of the network interface being used by FG to connect to the server - even if that's a local 192.168 type address. You can also leave your.ip.address blank. FlightGear will then listen on all network interfaces:
{{Note|
{{FGCquote
  |A socket connection requires not only an IP address, but also a port number for each side of the link - imagine a port number like a "mailbox" sitting at the address. This mailbox is used by the communicating processes to send out and receive "messages". Different processes (even when possibly identical programs) will need to use different port numbers when running. Because open ports ({{=}}mailboxes) cannot be shared.
Thus, you need to modify the client-side port settings for each additional instance that you are running on the same machine, and map the output port of one instance to the input port of the other instance (and vice versa).  
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=83068#p83068
    |title=<nowiki>Re: 2 FGFS instances / 1 win7 running same time with MP?</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Thu Jun 10</nowiki>
  }}
}}
}}


--multiplay=in,10,,5000
Command line parameters for the first instance:
<syntaxhighlight lang="bash">
--multiplay=out,10,127.0.0.1,5000 --multiplay=in,10,127.0.0.1,5001 --callsign=Test1
</syntaxhighlight>


{{tip|For a local setup between two fgfs instances without any [[Fgms|fgms/multiplayer server]] being involved, you merely need to map each I/O  port to the corresponding port of the other instance:
Command line parameters for the second instance:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
fgfs --multiplay=out,10,127.0.0.1,5000 --multiplay=in,10,127.0.0.1,5001 --callsign=one &
--multiplay=out,10,127.0.0.1,5001 --multiplay=in,10,127.0.0.1,5000 --callsign=Test2
fgfs --multiplay=out,10,127.0.0.1,5001 --multiplay=in,10,127.0.0.1,5000 --callsign=two &
</syntaxhighlight>
</syntaxhighlight>
You can use this kind of setup to test multiplayer related features or troubleshoot multiplayer related bug reports that may be otherwise hard to reproduce over MP, because you don't normally see what other people are doing in terms of configuring MP/fgfs.
[[File:Direct-p2p-multiplayer-setup.png|800px|Screen shots demonstrating a "peer-to-peer" setup between two fgfs instances running on the same machine via localhost/loopback (127.0.0.1) without any fgms/multiplayer server being involved]]
You can add an arbitrary number of channels to mirror your flight onto other servers, e.g. to a private fgms server using '''<nowiki>--multiplay=out,10,my.private.server.ip,5000</nowiki>'''.


Additionally, the "in"-argument above tells FG to listen '''only''' on the loopback/local interface - it will not receive packets arriving on the other network interface(s). If you want to also bind to other interfaces, just omit the IP address by using  '''<nowiki>--multiplay=in,10,,5000</nowiki>'''.
You can use this kind of setup to test multiplayer related features or troubleshoot multiplayer related bug reports that may be otherwise hard to reproduce over MP.  As you can't access the configuration of other people's FlightGear, this technique allows you to have complete control over FlightGear's settings.
}}
 
[[File:Direct-p2p-multiplayer-setup.png|800px|Screenshot demonstrating a "peer-to-peer" setup between two FlightGear instances running on the same machine via localhost (127.0.0.1) without any multiplayer server.]]
 
You can add an arbitrary number of channels to mirror your flight onto other servers, e.g. to a private fgms (FlightGear Multiplayer Server) using
<syntaxhighlight lang="bash">
--multiplay=out,10,my.private.server.ip,5000
</syntaxhighlight>
 
Additionally, the <code>in</code> argument above tells FG to listen '''only''' on the loopback/local interface - it will not receive packets arriving on the other network interface(s). If you want to also bind to other interfaces, just omit the IP address by using   
<syntaxhighlight lang="bash">
--multiplay=in,10,,5000
</syntaxhighlight>


Check [https://fgtracker.ml/ this page] to see whether your callsign is already in use or not. Do not pick a callsign that is already used, as that will create problems!


''If you are using fgrun, please note that fgrun expects you to enter a valid (non-loopback, i.e. not 127.0.0.1) IP address or hostname for the local network interface.''


Check [http://fgfs.i-net.hu/modules/fgtracker/ this page] to see whether your callsign is already in use or not. Do not pick a callsign that is already used, as that will create problems!


==== Now, going more slowly for those who are completely lost... ====
==== Now, going more slowly for those who are completely lost... ====
Try the above first, and if it doesn't work, read on.
{{Note|This section may contain out of date or inaccurate information.}}
This section ''ought'' to be unnecessary now with recent versions of the FG server. If you have problems though, it won't hurt to follow through.


First of all, you need to know the IP address of the network interface you'll be using for multiplayer FG. If your Internet connection is via an ADSL modem that plugs directly into your computer with a USB connection, you should be able to find your IP address by visiting http://www.whatismyip.com . Please note that your ISP might not give you the same IP address each time - if MP stops working, check this first.
First of all, you need to know the IP address of the network interface you'll be using for multiplayer FG.  


Otherwise, your connection is likely via some kind of router that connects to your computer via an RJ-45, or "Ethernet" connector (similar shape to most Western telephone plugs), or by a wireless link. You need to find the IP address of that network interface.
If your Internet connection is via an ADSL modem that plugs directly into your computer, you should be able to find your IP address by visiting http://www.whatismyip.com.  
{{Note|Your {{Abbr|ISP|Internet Service Provider}} might not give you the same IP address each time.}}


* Under '''Linux''', this can be found by logging in as root and typing "ifconfig". You may find more than one interface listed, beginning with "lo" - ignore that one. You should have something like "eth0" or "wlan0" also listed - look through this block of text for "inet addr". This will be followed directly by the number you're looking for, e.g. "inet addr:192.168.0.150"
If your connection is via an Ethernet connector or by a wireless link.
* Under '''Windows XP or later''', click start, run, and type "cmd". In the terminal window which appears, type "ipconfig" This should show you your IP address - write it down.
* With '''Windows 98''', click start, run, and type "winipcfg" to get information about your IP address.


This section _ought_ to be unnecessary now with recent versions of the FG server. If you have problems though, it won't hurt to follow through.
* '''Linux:''' Log in as root and run <code>ifconfig</code> in the terminal. In the text that is returned, you should to look for an interface name such as <code>eth0</code> or <code>wlan0</code>.  Finally, look in the text below the interface name for <code>inet addr:ip.address</code>. For example, this should read something like <code>inet addr:192.168.0.150</code>.
* '''Windows:'''
** '''Windows XP or later:''' Start Command Prompt and <code>ipconfig</code> into the terminal.  Write the IP address down.
** '''Windows 98''', click start, run, and type "winipcfg" to get information about your IP address.


Now, all (!) that remains is to configure your router to forward UDP port 5000 to the IP address you've just found. This is not something that can be described in step-by-step detail, because each manufacturer's configuration interfaces differ greatly. Some tips are given here - if you get stuck, ask nicely on the [[FlightGear IRC channel]] for help (details on the flightgear website).
Now, all that remains is to configure your router to forward UDP port 5000 to the IP address you've just found. This is not something that can be described in step-by-step detail, because each manufacturer's configuration interfaces differ greatly. Some tips are given here if you get stuck, ask nicely on the [[FlightGear IRC channel]] for help (details on the FlightGear website).


You should know how to log on to your router's configuration page, usually via a web browser. You are looking for settings pertaining to "port forwarding" "virtual server" "Forwarding Rules" or similar. When you have found the relevant settings, you need to add a rule that forwards port 5000 to the IP address you discovered earlier. If there is a choice given, ensure it is UDP ports that are forwarded. If there is no choice, you may assume that both TCP and UDP are being forwarded. Save your configuration, and most routers will probably then need to be rebooted to apply the changes.
You should know how to log on to your router's configuration page, usually via a web browser. You are looking for settings pertaining to "port forwarding," "virtual server," "Forwarding Rules," or similar. When you have found the relevant settings, you need to add a rule that forwards port 5000 to the IP address you discovered earlier. If there is a choice given, ensure it is UDP ports that are forwarded. If there is no choice, you may assume that both TCP and UDP are being forwarded. Save your configuration, and most routers will probably then need to be rebooted to apply the changes.


Note: (for BSD users) If you are using a ADSL modem, you might have to put the port forward command into the ppp.conf file rather than firewall. This is because the firewall script will only run each time the machine is booted rather than the ppp line coming back online.
{{Note|BSD users: If you are using a ADSL modem, you might have to put the port forward command into the ppp.conf file rather than firewall. This is because the firewall script will only run each time the machine is booted rather than the ppp line coming back online.}}


Finally, start FG using the command line given right at the start (if you're using the windows launcher you will find entry boxes for Multiplayer arguments - insert the relevant details there). You will end up with something like this;
Finally, start FG using the command line given right at the start (if you're using the Windows launcher you will find entry boxes for Multiplayer arguments insert the relevant details there). You will end up with something like this:
<syntaxhighlight lang="bash" enclose="div">
<other arguments> --callsign=test --multiplay=in,10,192.168.0.2,5000 --multiplay=out,10,mpserver05.flightgear.org,5000 --airport=KSFO --runway=28R --aircraft=hunter
</syntaxhighlight>


fgfs --callsign=test --multiplay=in,10,192.168.0.2,5000 --multiplay=out,10,mpserver05.flightgear.org,5000 \
Choose your own callsign, but check [https://fgtracker.ml/ this page] first to see whether your desired callsign is already in use or not. Do not pick a callsign that is already used, as that will create problems!
--airport=KSFO --runway=28R --aircraft=hunter
 
Choose your own callsign - this is currently limited to seven characters. Check [http://fgfs.i-net.hu/modules/fgtracker/ this page] to see whether your callsign is already in use or not. Do not pick a callsign that is already used, as that will create problems!


Once you have started FG, you should, if others are flying, see messages in the terminal from which FG was started, similar to the following;
Once you have started FG, you should, if others are flying, see messages in the terminal from which FG was started, similar to the following;
Line 89: Line 136:
  Call: john51a,model: Aircraft/ufo/Models/ufo.xml  
  Call: john51a,model: Aircraft/ufo/Models/ufo.xml  


You MUST give your local, behind-the-router IP address for MultiPlayer to work. Trust me on this one!
You MUST give your local, behind-the-router IP address for multiplayer to work. Trust me on this one!


You should check that your firewall is not causing problems - either turn it off _temporarily_ or add an exception to allow incoming connections on port 5000.
You should check that your firewall is not causing problems - either turn it off ''temporarily'' or add an exception to allow incoming connections on port 5000.


If it's still just not working for you, ask nicely on the [[FlightGear IRC channel]] and someone should be able to assist.
If it's still just not working for you, ask nicely on the [[FlightGear IRC channel|IRC channel]] or the [http://forum.flightgear.org/ forum] and someone should be able to assist.


=== Multiple connections per computer ===
=== Multiple connections per computer ===
It is possible to run multiple FlightGear instances on a single computer and connect them all to the multiplayer network. However, this requires some extras to keep in mind:
It is possible to run multiple FlightGear instances on a single computer and connect them all to the multiplayer network. However, this requires some extras to keep in mind:
* both instances use the same out-port.
# Both instances use the same <code>out</code> port.
* one instance uses in port=5001, the other port 5002.
# One instance uses <code>in</code> port <code>5001</code>, the other port <code>5002</code>.
* and of course should both instances have unique callsigns.
# Both instances have unique callsigns.
 
 
=== Optional collision detection in multiplayer ===
 
A patch has been added to FlightGear (since Version 3.5) to allow optional collision detection in multiplayer. To enable collision detection, start FlightGear with:
 
<syntaxhighlight>
--prop:bool:/sim/multiplay/hot=true
</syntaxhighlight>
 
Those who are able to patch FGData themselves, can download [http://sourceforge.net/p/flightgear/mailman/attachment/CAHs0wcrEwYZvXTddcUaH0ZMfmVNvEWRap8MXOrEoKybUDO58sQ%40mail.gmail.com/3/ mp-hot-fgdata.patch], which adds a checkbox to the Multiplayer Settings dialog to enable or disable the collision detection at runtime.


== Multiplayer chat ==
== Multiplayer chat ==
{{Main article|Chat Menu}}
{{Main article|Chat Menu}}


{{note|Multiplayer chat is not supported by FlightGear 0.9.10 or older.}}
To chat with other pilots, go to the <tt>Multiplayer</tt> menu and select <tt>Chat Menu</tt> at the bottom of the menu. Note that the other pilots may not have their chat box open nor chat messages enabled, so they may not see your messages.
 
To chat with other pilots, go to the "Network" menu and select "Chat" or "Chat Menu" at the bottom of the menu. Note that the other pilots may not have their chat box open nor chat messages enabled, so they may not see your messages.


The shortcut for chatting is "_" (underscore) and it brings up a small window where you can type. By default, other people's messages are displayed at the top of Flightgear's window for a few seconds, but it will appear for a much longer time in the window at <tt>Network > Chat</tt>. So if you think you have missed anything, go check there.
The shortcut for chatting is {{Key press|<nowiki>-</nowiki>}} (hyphen).  This will bring up some text in the upper-left of the FlightGear window.  By pressing the corresponding number keys, you can send pre-made messages.  Pressing {{Key press|1}} will let you type in a custom message, which you can send by pressing enter. By default, other people's messages are displayed at the top of FlightGear's window for a few seconds, but it will appear for a much longer time in the window at <tt>Network > Chat</tt>. So if you think you have missed anything, go check there.


== Coping with abusive behaviour ==
== Dealing with abusive behavior ==
Should you become victim of abusive or annoying behaviour by any pilot you have option to ignore him or her. To activate the ignore function open the Multiplayer > Pilot list dialog and click the ignore button next to the pilot's call sign. As of FlightGear 2.0.0 this will prevent chat messages from the ignored pilot from appearing and in FlightGear 2.4.0 and later it will additionally prevent his aircraft from appearing.
Should you become victim of abusive or annoying behavior by any pilot, you have option to ignore him or her. To activate the ignore function open the <tt>Multiplayer > Pilot list</tt> dialog and click the <tt>ignore</tt> button next to the pilot's callsign. This will prevent chat messages from the ignored pilot appearing and prevent his aircraft from appearing (unless you are using FlightGear v2.2 or older).


== Multiplayer map ==
== Multiplayer map ==
Line 120: Line 176:


== Servers ==
== Servers ==
{{note|The multiplayer servers are interconnected.  With few exceptions you '''do not''' need to connect to a specific server in order to see other pilots who are on that server. For best performance, you should connect to the server that is geographically closest to you, has the lowest latency (ping time) or is the least busy.}}
The multiplayer servers are interconnected.  With few exceptions you ''do not'' need to connect to a specific server in order to see other pilots who are on that server. For best performance, you should connect to the server that is either geographically closest to you, has the lowest latency (ping time), or is the least busy.
{{tip|Use [http://mpserver16.flightgear.org/ this], [http://mpmap01.flightgear.org/mpstatus/ this] or [http://flightgear.mxchange.org/mpstatus/ this] link to check if the MP servers are online. As of FlightGear 2.10.0, the in-sim dialog only displays servers that are available.}}
{{tip|Use [http://mpmap01.flightgear.org/mpstatus/ this link] to check if the MP servers are online. Page is automatically generated. The [[#In-sim Dialog|in-sim dialog]] will only display servers that are available.}}


{| class="wikitable sortable"
{| class="wikitable sortable"
! Server
! Server address
! Location
! Status
! [http://mpserver15.flightgear.org Tracked]
! Location  
! Maintainer
! Tracked (by [http://fgtracker.ml fgtracker.ml] unless otherwise specified)
! [[IRC]] Name
! Maintainer  
! [http://flightgear.org/forums Forum] Name
! Maintainer's [[IRC]] name
! Maintainer's [http://flightgear.org/forums forum] name
! Comments
! Comments
|-
|-
|mpserver01.flightgear.org
| mpserver01.flightgear.org
|Germany
| {{yes|Up}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| Germany
|Oliver Schroeder
| {{yes}}
|os
| Oliver Schröder
|
| os
|
| {{N/a}}
| {{N/a|None}}
|-
|-
|mpserver02.flightgear.org
| mpserver02.flightgear.org
|Los Angeles, USA
| {{yes|Up}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| Los Angeles, USA
|Lloyd Stevens
| {{N/a}}
|ls4680
| Lloyd Stevens
|ls4680
| ls4680
|
| ls4680
| {{N/a|None}}
|-
|-
|mpserver03.flightgear.org
| mpserver03.flightgear.org
|Germany  
| {{yes|Up}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| Germany  
|Hergen
| {{yes}}
|
| Hergen
|
| {{N/a}}
|
| {{N/a}}
| [https://mpserver03.flightgear.org mpserver03.flightgear.org]
|-
|-
|mpserver04.flightgear.org
| mpserver04.flightgear.org
|UK
| {{yes|Up}}
|{{no}}
| UK
|Jon Stockill
| {{no}}
|Nav
| Jon Stockill
|JonS
| Nav
|
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=738 JonS]
| {{N/a|None}}
|-
|-
|mpserver05.flightgear.org
| mpserver05.flightgear.org
|Chicago, USA
| {{no|Down}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| Chicago, USA
|Brant
| {{N/a}}
|IonCannon218
| Brant
|
| IonCannon218
|
| {{N/a}}
| {{N/a|None}}
|-       
|-       
|mpserver06.flightgear.org
| mpserver06.flightgear.org
|Berlin, Germany
| {{no|Down}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| Berlin, Germany
|Sven Teichmann
| {{N/a}}
|
| Sven Teichmann
|D-SAMI
| {{N/a}}
|Unlimited traffic
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=11839 D-SAMI]
| Unlimited traffic
|-       
|-       
|mpserver07.flightgear.org
| mpserver07.flightgear.org
|Wisconsin, USA
| {{no|Down}}
|{{n/a}}
| Wisconsin, USA
|Tom Betka
| {{N/a}}
|TB
| Tom Betka
|
| TB
|Offline
| {{N/a}}
| Offline
|-       
|-       
|mpserver08.flightgear.org
| mpserver08.flightgear.org
|Frankfurt am Main, Germany
| {{no|Down}}
|{{no}}
| Frankfurt am Main, Germany
|Roland
| {{N/a}}
|Quix0r
| Roland
|Quix0r
| Quix0r
|10 TByte traffic, mostly short pings
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=7512 Quix0r]
| 10 TByte traffic, mostly short pings
|-
| mpserver09.flightgear.org
| {{no|Down}}
| Köln, Germany
| {{N/a}}
| Daniel Vigano
| Fauchi95
| {{N/a}}
| Offline
|-
| mpserver10.flightgear.org
| {{no|Down}}
| Montpellier, France
| {{N/a}}
| {{usr|Xiii|Alexis Bory}}
| xiii
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=884 xiii]
| {{N/a|None}}
|-
|-
|mpserver09.flightgear.org
| mpserver11.flightgear.org
|Köln, Germany
| {{no|Down}}
|{{n/a}}
| Vilnius, Lithuania
|Daniel Vigano
| {{N/a}}
|Fauchi95
| Darius
|
| {{N/a}}
|Offline
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=1122 ffg]
| {{N/a|None}}
|-
|-
|mpserver10.flightgear.org
| mpserver12.org
|Montpellier, France
| {{no}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| Amsterdam, the Netherlands
|Alexis Bory
| {{no}} ([http://mpserver12.org mpserver12.org])
|xiii
| Rob
|xiii
| evilslut
|
| {{N/a}}
| Formerly mpserver12.flightgear.org<ref>http://forum.flightgear.org/viewtopic.php?f=27&t=27453&start=60#p258435</ref>
|-
|-
|mpserver11.flightgear.org
| mpserver13.flightgear.org
|Vilnius, Lithuania
| {{yes|Up}}
|{{no}}
| Beauvais, France
|Darius
| {{N/a}}
|
| Charles Ingels
|ffg
| charles
|
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=1592 cbz-026]
| {{N/a|None}}
|-
|-
|mpserver12.flightgear.org
| mpserver14.flightgear.org
|Amsterdam, the Netherlands
| {{yes|Up}}
|{{yes|[http://mpserver12.flightgear.org mpserver12]}}
| UK
|Rob
| {{no}}
|evilslut
| Pete
|evilslut
| {{N/a}}
|
| {{N/a}}
| {{N/a|None}}
|-
|-
|mpserver13.flightgear.org
| mpserver15.flightgear.org
|Grenoble, France
| {{yes|Up}}
|{{no}}
| North Point, Hong Kong
|Charles Ingels
| {{yes}}
|charles
| Hazuki Amamiya
|cbz-026
| Hazuki
|
| [https://forum.flightgear.org/memberlist.php?mode=viewprofile&u=8400 Hazuki]
| {{N/a|None}}
|-
|-
|mpserver14.flightgear.org
| mpserver16.flightgear.org
|Zurich, Switzerland
| {{yes|Up}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| Kansas City, Missouri, USA
|Yves Sablonier
| {{no}}
|gral
| Rob Dosogne
|gral
| truthsolo
|
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=9926 truthsolo]
| {{N/a|None}}
|-
|-
|mpserver15.flightgear.org
| mpserver17.flightgear.org
|North Point, Hong Kong
| {{no|Down}}
|{{n/a}}
| Cluj, Romania
|Hazuki Amamiya
| {{N/a}}
|Hazuki
| Marius
|Hazuki
| tuxum
|This is FGTracker, not a multiplayer server
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=11636 tuxum]
| Offline
|-
|-
|mpserver16.flightgear.org
| mpserver18.flightgear.org
|Kansas City, Missouri, USA
| {{no|Down}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| Germany
|Rob Dosogne
| {{N/a}}
|truthsolo
| {{N/a}}
|truthsolo
| {{N/a}}
|
| {{N/a}}
| {{N/a}}
|-
|-
|mpserver17.flightgear.org
| mpserver19.flightgear.org
|Cluj, Romania
| {{yes|Up}}
|{{n/a}}
| London, UK
|Marius
| {{yes}}
|tuxum
| Dr. R0ckso
|tuxum
| drr0ckso
|Offline
| [https://forum.flightgear.org/memberlist.php?mode=viewprofile&u=21111 drR0ckso]
| {{N/a|None}}
|-
|-
|mpserver18.flightgear.org
| mpserver20.flightgear.org
|Germany
| {{yes|Up}}
|{{yes|[http://mpserver15.flightgear.org mpserver15]}}
| South San Francisco, California, USA
|
| {{yes}}
|
| Marisa Giancarla
|
| marisag
|
| [https://forum.flightgear.org/memberlist.php?mode=viewprofile&u=21604 marisag]
| {{N/a|None}}
|-
| mpserver21.flightgear.org
| {{yes|Up}}
| Tokyo, Japan
| {{yes}}
| Marisa Giancarla
| marisag
| [https://forum.flightgear.org/memberlist.php?mode=viewprofile&u=21604 marisag]
| {{N/a|None}}
|-
| mpserver51.flightgear.org
| {{yes|Up}}
| Atlanta, Georgia, USA
| {{yes}}
| Dr. R0ckso
| drr0ckso
| [https://forum.flightgear.org/memberlist.php?mode=viewprofile&u=21111 drR0ckso]
| Radio horizon is 414 miles
|}
|}
''Information as at 2014-01-04''


Geographic locations of the servers are also available at [http://goo.gl/maps/jBwUd Google Maps].
Geographic locations of the servers are also available at [http://goo.gl/maps/jBwUd Google Maps].
Line 282: Line 392:
If you are interested in hosting your own multiplayer server, you may want to check out [[Howto: Set up a multiplayer server]].
If you are interested in hosting your own multiplayer server, you may want to check out [[Howto: Set up a multiplayer server]].


== Problems associated with specific Internet Service Providers ==
== Known issues ==
=== Fibertel (Argentina) ===
In December 2014, it was reported that UDP connection through port 5000 was not possible for users whose ISP was {{Wikipedia|Fibertel}} (Argentina).


'''Fibertel Argentina'''
Fibertel Argentina apparently uses the port for setup purposes. "It should be open for the user but it might not be fully functional."


It has been reported '''December 2014''' that UDP connection through port 5000 is not possible. Fibertel Argentina users do not have full access to the modem configuration at the moment, they have to pass through a ''very limited'' interface on the Fibertel web site, only aimed at allowing operations like switching on/off the wifi radio or switching between NAT router mode and bridge mode (and at the moment a bug made users unable to submit any configuration changes).
Port 5000 is a generic port, and neither FlightGear nor the {{Wikipedia|UPnP}} protocol are an "official" usage of the port.
After various hours of tests by the user with and without Fibertel staff at the phone with the modem in NAT router mode and in bridge mode, after a supervisor decided to remotely flash the modem (Motorola) with a recent firmware and yet noticed strange behaviour and sent tech staff to replace the modem with a simpler one (another Motorola model with no wifi), after testing with it in bridge mode with tech staff at the phone, the user sought for help [http://forum.flightgear.org/viewtopic.php?f=27&t=24754&p=226034#p226034 in the forum] and finally '''a temporary standalone instance of the Multiplayer server software''' (located in Canada) was activated and '''the user was able to connect normally through all the tested ports (5001, 5002, 5003, 5507) but not through port 5000 which is the only available port in any FlightGear Multiplayer server at the moment'''. Through another Internet Service Provider (Speedy ADSL) the user could connect with no problems to port 5000 of any Multiplayer server.


Facing this evidence, Fibertel Argentina technical staff ''finally'' admitted: "It's not the modem, it's the network, our network uses port 5000 for setup purposes, it should be open for the user but it might not be fully functional". '''This is reported here to avoid other users a similar 60-70 hours time loss.''' The users reports he asked them with energy to stop filtering port 5000, the answer was that because of the implications that was not an option.
A solution would be to spread the ports between the servers; e.g., mpserver01.flightgear.org → 5001, mpserver02.flightgear.org → 5002


Port 5000 is unofficially associated both with FlightGear and the UPnP protocol.
See also the [http://forum.flightgear.org/viewtopic.php?f=27&t=24754 forum thread] and {{issue|1617}}.
However, it has been observed (discussion of [https://code.google.com/p/flightgear-bugs/issues/detail?id=1617&q=-Type%3DFeatureRequest%20-status%3ATesting&sort=-id&colspec=ID%20Type%20Status%20Priority%20Summary%20Aircraft%20Milestone issue 1617]) that '''the fact that Fibertel Argentina is using port 5000 for network setup purposes shouldn't imply that they are filtering packets: ''"it should really only be when the packet has reached its destination that the port number has any meaning at all"'''''.
 
Forum thread full link: http://forum.flightgear.org/viewtopic.php?f=27&t=24754&p=226034#p226034).
 
Reported issue 1617 full link: https://code.google.com/p/flightgear-bugs/issues/detail?id=1617&q=-Type%3DFeatureRequest%20-status%3ATesting&sort=-id&colspec=ID%20Type%20Status%20Priority%20Summary%20Aircraft%20Milestone
 
Besides investigating about '''possible workarounds(?)''' (port forwarding through UDP bidirectional tunnelling) which might or might not add too much network latency or CPU load or constitute a misuse of special purposes networks, the user suggested diversification of port numbers (''"offering two possible port numbers could mean offering twice the chances to connect to the Multiplayer network and would constitute a reasonable prevention measure of part of the possible connection problems of FlightGear users over the internet"'').
 
However, coding work on the server software is not priority at the moment, and any change to servers might turn out to be a "nightmare on the server admins side to implement [...]", not to mention "[...] the fact that most if not all of them are volunteering time and machines for this".
 
The simplest workaround would just be a new server offering a different port number.


== Related content ==
== Related content ==
Line 308: Line 408:
* [[Howto: Set up a multiplayer server]]
* [[Howto: Set up a multiplayer server]]
* [[Multiplayer protocol]]
* [[Multiplayer protocol]]
* [[Howto:Transmit_properties_over_MP]]
{{Appendix}}


[[Category:Multiplayer]]
[[Category:Multiplayer]]
Line 315: Line 418:
[[es:Howto: Multijugador]]
[[es:Howto: Multijugador]]
[[fr:Howto: Multijoueur]]
[[fr:Howto: Multijoueur]]
[[it:Come fare:Multiplayer]]
[[nl:Howto: Multiplayer]]
[[nl:Howto: Multiplayer]]
[[pl: Konfiguracja trybu multiplayer]]
[[pl:Konfiguracja trybu multiplayer]]
[[pt:Tutorial_de_Multiplayer]]
[[pt:Tutorial de Multiplayer]]

Revision as of 15:49, 27 December 2017

The multiplayer feature of FlightGear makes it possible to see other pilots and vice-versa. This makes it possible to fly in formation, perform mid-air refueling with tankers controlled by real people or contact real air traffic controllers to ask for guidance.

Multiplayer may cause extreme framerate drops during the loading of aircraft models, especially heavy models such as the Boeing 777 or Airbus A320neo. It is suggested to fly in locations other than the default San Francisco International Airport, as there are often lots of pilots in the area who are often new, and do not follow ATC, or respect traffic.

Notes

  • Callsigns can be a maximum of seven characters.
  • You might want to check the Known issues section.

Connecting to Multiplayer

Built-in launcher and in-sim dialog

Multiplayer settings dialog

The easiest way to get online is to use the built-in launcher or the in-sim Multiplayer dialog. All you need to do is enter a callsign and select a server from the menu. Press Connect to go online.

Using FGRun

From the main page

Multiplayer settings in FGRun
  1. Select your aircraft and starting airport as normal in FGRun.
  2. On the last screen, tick the "Multiplayer" box. Also make sure that the "AI models" box is checked or you will not be able to see the other pilots' aircraft.
  3. Enter the …
    • Callsign of your choice.
    • Hostname: Enter mpserverXX.flightgear.org (with XX being the server number).
    • In/Out: Set both ports to 5000.
  4. Click Run to start FlightGear.

To confirm that it's working, you can go to the multiplayer map at http://mpmap02.flightgear.org/ (in Hong Kong). Once FlightGear has started, you will notice chat messages that say "Hello" indicating pilots that are online. They will also pop up when a pilot joins the MP network. You can change this message by editing this line in $FG_ROOT/preferences.xml:

<chat type="string" preserve="y">Hello</chat>

You may wish to use a different server, especially one closer to you.

From Network Settings

The Network tab of the Advanced Options dialog in FGRun (in FlightGear 3.2.0).

You can also change multiplayer settings in the Network tab of FGRun's Advanced Options.

  1. On the last page, click Advanced.
  2. Click Network in the left column.
  3. In the Multiplayer Options area …
    • Type your desired callsign into the box.
    • Set the parameters for the two other boxes; see below for correct syntax.
    • Click OK, then run FlightGear.

Using multiplayer from the command line

When running FlightGear from the command line, you can specify multiplayer settings. The two arguments are as follows:

--multiplay=direction,10,ip.address,port
--callsign=anything

Obviously, --callsign can be anything you wish. There are four arguments to --multiplay:

direction
Either in or out. in tells FlightGear to listen to packets of data coming in through the specified port. out tells FlightGear to send data out through the port.
ip.address
IP address of network interface being used by FlightGear. If left blank, FlightGear will listen to all network interfaces. If direction is set to in, FlightGear will listen to only this IP address.
port
Port that data is either being sent or received through. Usually set to 5000 and above.

Advanced usage of multiplayer

Local setup for testing

It is possible to set up a local multiplayer network between two FlightGear instances without using a multiplayer server. All you need to do is map each I/O port of one instance to the corresponding port(s) of the other instance:

Note
Cquote1.png A socket connection requires not only an IP address, but also a port number for each side of the link - imagine a port number like a "mailbox" sitting at the address. This mailbox is used by the communicating processes to send out and receive "messages". Different processes (even when possibly identical programs) will need to use different port numbers when running. Because open ports (=mailboxes) cannot be shared.

Thus, you need to modify the client-side port settings for each additional instance that you are running on the same machine, and map the output port of one instance to the input port of the other instance (and vice versa).


Cquote2.png

Command line parameters for the first instance:

--multiplay=out,10,127.0.0.1,5000 --multiplay=in,10,127.0.0.1,5001 --callsign=Test1

Command line parameters for the second instance:

--multiplay=out,10,127.0.0.1,5001 --multiplay=in,10,127.0.0.1,5000 --callsign=Test2

You can use this kind of setup to test multiplayer related features or troubleshoot multiplayer related bug reports that may be otherwise hard to reproduce over MP. As you can't access the configuration of other people's FlightGear, this technique allows you to have complete control over FlightGear's settings.

Screenshot demonstrating a "peer-to-peer" setup between two FlightGear instances running on the same machine via localhost (127.0.0.1) without any multiplayer server.

You can add an arbitrary number of channels to mirror your flight onto other servers, e.g. to a private fgms (FlightGear Multiplayer Server) using

--multiplay=out,10,my.private.server.ip,5000

Additionally, the in argument above tells FG to listen only on the loopback/local interface - it will not receive packets arriving on the other network interface(s). If you want to also bind to other interfaces, just omit the IP address by using

--multiplay=in,10,,5000

Check this page to see whether your callsign is already in use or not. Do not pick a callsign that is already used, as that will create problems!


Now, going more slowly for those who are completely lost...

Note  This section may contain out of date or inaccurate information.

This section ought to be unnecessary now with recent versions of the FG server. If you have problems though, it won't hurt to follow through.

First of all, you need to know the IP address of the network interface you'll be using for multiplayer FG.

If your Internet connection is via an ADSL modem that plugs directly into your computer, you should be able to find your IP address by visiting http://www.whatismyip.com.

Note  Your ISP might not give you the same IP address each time.

If your connection is via an Ethernet connector or by a wireless link.

  • Linux: Log in as root and run ifconfig in the terminal. In the text that is returned, you should to look for an interface name such as eth0 or wlan0. Finally, look in the text below the interface name for inet addr:ip.address. For example, this should read something like inet addr:192.168.0.150.
  • Windows:
    • Windows XP or later: Start Command Prompt and ipconfig into the terminal. Write the IP address down.
    • Windows 98, click start, run, and type "winipcfg" to get information about your IP address.

Now, all that remains is to configure your router to forward UDP port 5000 to the IP address you've just found. This is not something that can be described in step-by-step detail, because each manufacturer's configuration interfaces differ greatly. Some tips are given here – if you get stuck, ask nicely on the FlightGear IRC channel for help (details on the FlightGear website).

You should know how to log on to your router's configuration page, usually via a web browser. You are looking for settings pertaining to "port forwarding," "virtual server," "Forwarding Rules," or similar. When you have found the relevant settings, you need to add a rule that forwards port 5000 to the IP address you discovered earlier. If there is a choice given, ensure it is UDP ports that are forwarded. If there is no choice, you may assume that both TCP and UDP are being forwarded. Save your configuration, and most routers will probably then need to be rebooted to apply the changes.

Note  BSD users: If you are using a ADSL modem, you might have to put the port forward command into the ppp.conf file rather than firewall. This is because the firewall script will only run each time the machine is booted rather than the ppp line coming back online.

Finally, start FG using the command line given right at the start (if you're using the Windows launcher you will find entry boxes for Multiplayer arguments – insert the relevant details there). You will end up with something like this:

<other arguments> --callsign=test --multiplay=in,10,192.168.0.2,5000 --multiplay=out,10,mpserver05.flightgear.org,5000 --airport=KSFO --runway=28R --aircraft=hunter

Choose your own callsign, but check this page first to see whether your desired callsign is already in use or not. Do not pick a callsign that is already used, as that will create problems!

Once you have started FG, you should, if others are flying, see messages in the terminal from which FG was started, similar to the following;

Initialising john51a using 'Aircraft/ufo/Models/ufo.xml'  
FGMultiplayRxMgr::ProcessRxData - Add new player. IP: 10.0.0.36,  
Call: john51a,model: Aircraft/ufo/Models/ufo.xml 

You MUST give your local, behind-the-router IP address for multiplayer to work. Trust me on this one!

You should check that your firewall is not causing problems - either turn it off temporarily or add an exception to allow incoming connections on port 5000.

If it's still just not working for you, ask nicely on the IRC channel or the forum and someone should be able to assist.

Multiple connections per computer

It is possible to run multiple FlightGear instances on a single computer and connect them all to the multiplayer network. However, this requires some extras to keep in mind:

  1. Both instances use the same out port.
  2. One instance uses in port 5001, the other port 5002.
  3. Both instances have unique callsigns.


Optional collision detection in multiplayer

A patch has been added to FlightGear (since Version 3.5) to allow optional collision detection in multiplayer. To enable collision detection, start FlightGear with:

--prop:bool:/sim/multiplay/hot=true

Those who are able to patch FGData themselves, can download mp-hot-fgdata.patch, which adds a checkbox to the Multiplayer Settings dialog to enable or disable the collision detection at runtime.

Multiplayer chat

1rightarrow.png See Chat Menu for the main article about this subject.

To chat with other pilots, go to the Multiplayer menu and select Chat Menu at the bottom of the menu. Note that the other pilots may not have their chat box open nor chat messages enabled, so they may not see your messages.

The shortcut for chatting is - (hyphen). This will bring up some text in the upper-left of the FlightGear window. By pressing the corresponding number keys, you can send pre-made messages. Pressing 1 will let you type in a custom message, which you can send by pressing enter. By default, other people's messages are displayed at the top of FlightGear's window for a few seconds, but it will appear for a much longer time in the window at Network > Chat. So if you think you have missed anything, go check there.

Dealing with abusive behavior

Should you become victim of abusive or annoying behavior by any pilot, you have option to ignore him or her. To activate the ignore function open the Multiplayer > Pilot list dialog and click the ignore button next to the pilot's callsign. This will prevent chat messages from the ignored pilot appearing and prevent his aircraft from appearing (unless you are using FlightGear v2.2 or older).

Multiplayer map

MPMap screenshot

1rightarrow.png See MPMap for the main article about this subject.

There is a very nice online map which displays the location of online pilots at mpmap02. You will also find this useful to check that you are successfully connecting to the server, as well as looking up navaids, waypoints, airports, frequencies, weather, and more!

Servers

The multiplayer servers are interconnected. With few exceptions you do not need to connect to a specific server in order to see other pilots who are on that server. For best performance, you should connect to the server that is either geographically closest to you, has the lowest latency (ping time), or is the least busy.

Tip  Use this link to check if the MP servers are online. Page is automatically generated. The in-sim dialog will only display servers that are available.
Server address Status Location Tracked (by fgtracker.ml unless otherwise specified) Maintainer Maintainer's IRC name Maintainer's forum name Comments
mpserver01.flightgear.org Up Germany Yes Oliver Schröder os N/A None
mpserver02.flightgear.org Up Los Angeles, USA N/A Lloyd Stevens ls4680 ls4680 None
mpserver03.flightgear.org Up Germany Yes Hergen N/A N/A mpserver03.flightgear.org
mpserver04.flightgear.org Up UK No Jon Stockill Nav JonS None
mpserver05.flightgear.org Down Chicago, USA N/A Brant IonCannon218 N/A None
mpserver06.flightgear.org Down Berlin, Germany N/A Sven Teichmann N/A D-SAMI Unlimited traffic
mpserver07.flightgear.org Down Wisconsin, USA N/A Tom Betka TB N/A Offline
mpserver08.flightgear.org Down Frankfurt am Main, Germany N/A Roland Quix0r Quix0r 10 TByte traffic, mostly short pings
mpserver09.flightgear.org Down Köln, Germany N/A Daniel Vigano Fauchi95 N/A Offline
mpserver10.flightgear.org Down Montpellier, France N/A Alexis Bory xiii xiii None
mpserver11.flightgear.org Down Vilnius, Lithuania N/A Darius N/A ffg None
mpserver12.org No Amsterdam, the Netherlands No (mpserver12.org) Rob evilslut N/A Formerly mpserver12.flightgear.org[1]
mpserver13.flightgear.org Up Beauvais, France N/A Charles Ingels charles cbz-026 None
mpserver14.flightgear.org Up UK No Pete N/A N/A None
mpserver15.flightgear.org Up North Point, Hong Kong Yes Hazuki Amamiya Hazuki Hazuki None
mpserver16.flightgear.org Up Kansas City, Missouri, USA No Rob Dosogne truthsolo truthsolo None
mpserver17.flightgear.org Down Cluj, Romania N/A Marius tuxum tuxum Offline
mpserver18.flightgear.org Down Germany N/A N/A N/A N/A N/A
mpserver19.flightgear.org Up London, UK Yes Dr. R0ckso drr0ckso drR0ckso None
mpserver20.flightgear.org Up South San Francisco, California, USA Yes Marisa Giancarla marisag marisag None
mpserver21.flightgear.org Up Tokyo, Japan Yes Marisa Giancarla marisag marisag None
mpserver51.flightgear.org Up Atlanta, Georgia, USA Yes Dr. R0ckso drr0ckso drR0ckso Radio horizon is 414 miles

Geographic locations of the servers are also available at Google Maps.

If you are interested in hosting your own multiplayer server, you may want to check out Howto: Set up a multiplayer server.

Known issues

Fibertel (Argentina)

In December 2014, it was reported that UDP connection through port 5000 was not possible for users whose ISP was Fibertel This is a link to a Wikipedia article (Argentina).

Fibertel Argentina apparently uses the port for setup purposes. "It should be open for the user but it might not be fully functional."

Port 5000 is a generic port, and neither FlightGear nor the UPnP This is a link to a Wikipedia article protocol are an "official" usage of the port.

A solution would be to spread the ports between the servers; e.g., mpserver01.flightgear.org → 5001, mpserver02.flightgear.org → 5002

See also the forum thread and ticket #1617.

Related content

References