Howto:Multiplayer

From FlightGear wiki
Jump to navigation Jump to search

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.

Multiplayer settings in launcher

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 but it must be limited to 7 (seven) characters in length counting any dashes. If your callsign is too long, it will be cut off in the various displays where it is shown. Generally speaking, callsigns are of the form X-XXXXX. 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! Please don't leave your callsign as "CALLSIG".

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!

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.

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 This is a link to the FlightGear 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 This is a link to the FlightGear forum. 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 This is a link to the FlightGear forum. 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 This is a link to the FlightGear forum. 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 This is a link to the FlightGear forum. None
mpserver11.flightgear.org Down Vilnius, Lithuania N/A Darius N/A ffg This is a link to the FlightGear forum. 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 This is a link to the FlightGear forum. 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 This is a link to the FlightGear forum. None
mpserver16.flightgear.org Down Kansas City, Missouri, USA N/A Rob Rozestraten truthsolo truthsolo This is a link to the FlightGear forum. Offline
mpserver17.flightgear.org Down Cluj, Romania N/A Marius tuxum tuxum This is a link to the FlightGear forum. Offline
mpserver18.flightgear.org Down Germany N/A N/A N/A N/A N/A
mpserver19.flightgear.org Up London, UK Yes Marisa Giancarla marisag marisag This is a link to the FlightGear forum. flightgearuk.gameplayer.club
mpserver20.flightgear.org Up South San Francisco, California, USA Yes Marisa Giancarla marisag marisag This is a link to the FlightGear forum. None
mpserver21.flightgear.org Up Tokyo, Japan Yes Marisa Giancarla marisag marisag This is a link to the FlightGear forum. None
mpserver22.flightgear.org Up Munich, Germany No Fabian Gilgen ivelischt ivelischt None
mpserver25.flightgear.org Up Mumbai, India Yes Marisa Giancarla marisag marisag This is a link to the FlightGear forum. flightgearin.gameplayer.club
mpserver26.flightgear.org Up Frankfurt, Germany Yes Marisa Giancarla marisag marisag This is a link to the FlightGear forum. flightgearde.gameplayer.club
mpserver51.flightgear.org Up Atlanta, Georgia, USA Yes Marisa Giancarla marisag marisag This is a link to the FlightGear forum. flightgearat.gameplayer.club
mpserver87.flightgear.org Up London, England Yes Megaf Megaf Megaf This is a link to the FlightGear forum. 2000 nmi Range and Radar Range.
mpcn01.fgprc.org Up Shanghai, China No Weihao Lee N/A N/A 100 nm Range and 2000nm Radar Range.
mpcn02.fgprc.org Up NewYork, US No Sidi Liang N/A sidi762 This is a link to the FlightGear forum. 200 nm Range and 2000nm Radar Range.

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 This is a link to the FlightGear forum. and ticket #1617.

Related content

References