Howto:Multiplayer: Difference between revisions

m
no edit summary
(Fix example, start new table)
mNo edit summary
(34 intermediate revisions by 16 users not shown)
Line 8: Line 8:


== 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.


=== Using FGRun ===
=== Using FGRun ===
Line 44: Line 44:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
--multiplay=direction,10,ip.address,port
--multiplay=direction,10,ip.address,port
--callsign=anything  
--callsign=anything
</syntaxhighlight>
</syntaxhighlight>


Obviously, <code>--callsign</code> can be anything you wish. There are four arguments to <code>--multiplay</code>:
Obviously, <code>--callsign</code> 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 [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! Please don't leave your callsign as "CALLSIG".
 
There are four arguments to <code>--multiplay</code>:
; direction
; 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'''.
: 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'''.
Line 59: Line 61:
== Advanced usage of multiplayer ==
== Advanced usage of multiplayer ==
=== Local setup for testing ===
=== Local setup for testing ===
It is possible to set up a local multiplayer network between to 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.
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:
 
{{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={{forum url|p=83068}}
    |title=<nowiki>Re: 2 FGFS instances / 1 win7 running same time with MP?</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Thu Jun 10</nowiki>
  }}
}}
}}


Command line parameters for the first instance:
Command line parameters for the first instance:
Line 75: Line 89:
[[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.]]
[[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 server using  
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">
<syntaxhighlight lang="bash">
--multiplay=out,10,my.private.server.ip,5000
--multiplay=out,10,my.private.server.ip,5000
Line 85: Line 99:
</syntaxhighlight>
</syntaxhighlight>


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!
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!
 
 


==== Now, going more slowly for those who are completely lost... ====
==== Now, going more slowly for those who are completely lost... ====
Line 114: Line 130:
</syntaxhighlight>
</syntaxhighlight>


Choose your own callsign, but check [http://fgfs.i-net.hu/modules/fgtracker/ 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!
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!


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 126: Line 142:
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|IRC channel]] or the [http://forum.flightgear.org/ forum] 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 {{forum link|text=forum}} and someone should be able to assist.


=== Multiple connections per computer ===
=== Multiple connections per computer ===
Line 133: Line 149:
# One instance uses <code>in</code> port <code>5001</code>, the other port <code>5002</code>.
# One instance uses <code>in</code> port <code>5001</code>, the other port <code>5002</code>.
# 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 ==
Line 152: Line 179:
== Servers ==
== 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.
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://mpmap01.flightgear.org/mpstatus/ this link] or [http://mpserver15.flightgear.org/mpserverstatus/ this link] to check if the MP servers are online. Both pages are automatically generated.  The [[#In-sim Dialog|in-sim dialog]] will only display 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 address
! Server address
! Status
! Status
! Location  
! Location  
! Tracked<ref>Note, this means that the server is tracked by [http://mpserver15.flightgear.org mpserver15], meaning that your flight can be seen by visiting http://mpserver15.flightgear.org/modules/fgtracker/. Servers that are not may still be tracked although that isn't guaranteed.  the minimum [[FGMS]] version required for tracking is 0.10.23.</ref>
! Tracked (by [http://fgtracker.ml fgtracker.ml] unless otherwise specified)
! Maintainer  
! Maintainer  
! Maintainer's [[IRC]] name  
! Maintainer's [[IRC]] name  
! Maintainer's [http://flightgear.org/forums forum] name
! Maintainer's {{forum link|text=forum}} name
! Comments
|}
http://mpserver15.flightgear.org/mpserverstatus/
http://mpserver16.flightgear.org/
http://mpmap01.flightgear.org/mpstatus/
http://flightgear.mxchange.org/mpstatus/
-->
{| class="wikitable sortable"
! Server address
! Status
! Location
! Tracked (by [http://mpserver15.flightgear.org mpserver15])?
! Maintainer
! Maintainer's [[IRC]] name
! Maintainer's [http://flightgear.org/forums forum] name
! Comments
! Comments
|-
|-
Line 183: Line 195:
| Germany
| Germany
| {{yes}}
| {{yes}}
| Oliver Schroeder
| Oliver Schröder
| os
| os
| {{N/a}}
| {{N/a}}
Line 191: Line 203:
| {{yes|Up}}
| {{yes|Up}}
| Los Angeles, USA
| Los Angeles, USA
| {{yes}}
| {{N/a}}
| Lloyd Stevens
| Lloyd Stevens
| ls4680
| ls4680
Line 204: Line 216:
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
| [https://mpserver03.flightgear.org mpserver03.flightgear.org]
|-
|-
| mpserver04.flightgear.org
| mpserver04.flightgear.org
| {{yes|Up}}
| {{yes|Up}}
| UK
| UK
| {{Yes}}
| {{no}}
| Jon Stockill
| Jon Stockill
| Nav
| Nav
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=738 JonS]
| {{forum link|type=member|u=738|text=JonS}}
| {{N/a}}
| {{N/a|None}}
|-
|-
| mpserver05.flightgear.org
| mpserver05.flightgear.org
| {{no|Down}}
| {{no|Down}}
| Chicago, USA
| Chicago, USA
| {{no}}
| {{N/a}}
| Brant
| Brant
| IonCannon218
| IonCannon218
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a|None}}
|-       
|-       
| mpserver06.flightgear.org
| mpserver06.flightgear.org
| {{no|Down}}
| {{no|Down}}
| Berlin, Germany
| Berlin, Germany
| {{no}}
| {{N/a}}
| Sven Teichmann
| Sven Teichmann
| {{N/a}}
| {{N/a}}
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=11839 D-SAMI]
| {{forum link|type=member|u=11839|text=D-SAMI}}
| Unlimited traffic
| Unlimited traffic
|-       
|-       
Line 245: Line 257:
| {{no|Down}}
| {{no|Down}}
| Frankfurt am Main, Germany
| Frankfurt am Main, Germany
| {{No}}
| {{N/a}}
| Roland
| Roland
| Quix0r
| Quix0r
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=7512 Quix0r]
| {{forum link|type=member|u=7512|text=Quix0r}}
| 10 TByte traffic, mostly short pings
| 10 TByte traffic, mostly short pings
|-
|-
Line 261: Line 273:
|-
|-
| mpserver10.flightgear.org
| mpserver10.flightgear.org
| {{yes|Up}}
| {{no|Down}}
| Montpellier, France
| Montpellier, France
| {{yes}}
| {{N/a}}
| {{usr|Xiii|Alexis Bory}}
| {{usr|Xiii|Alexis Bory}}
| xiii
| xiii
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=884 xiii]
| {{forum link|type=member|u=884|text=xiii}}
| {{N/a}}
| {{N/a|None}}
|-
|-
| mpserver11.flightgear.org
| mpserver11.flightgear.org
| {{no|Down}}
| {{no|Down}}
| Vilnius, Lithuania
| Vilnius, Lithuania
| {{No}}
| {{N/a}}
| Darius
| Darius
| {{N/a}}
| {{N/a}}
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=1122 ffg]
| {{forum link|type=member|u=1122|text=ffg}}
| {{N/a}}
| {{N/a|None}}
|-
|-
| mpserver12.flightgear.org
| mpserver12.org
| {{yes|Up}}
| {{no}}
| Amsterdam, the Netherlands
| Amsterdam, the Netherlands
| {{yes}}
| {{no}} ([http://mpserver12.org mpserver12.org])
| Rob
| Rob
| evilslut
| evilslut
| evilslut
| {{N/a}}
| {{N/a}}
| Formerly mpserver12.flightgear.org<ref>{{forum url|p=258435}}</ref>
|-
|-
| mpserver13.flightgear.org
| mpserver13.flightgear.org
| {{yes|Up}}
| {{yes|Up}}
| Grenoble, France
| Beauvais, France
| {{No}}
| {{N/a}}
| Charles Ingels
| Charles Ingels
| charles
| charles
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=1592 cbz-026]
| {{forum link|type=member|u=1592|text=cbz-026}}
| {{N/a}}
| {{N/a|None}}
|-
|-
| mpserver14.flightgear.org
| mpserver14.flightgear.org
| {{yes|Up}}
| {{yes|Up}}
| Zurich, Switzerland
| UK
| {{yes}}
| {{no}}
| Yves Sablonier
| Pete
| gral
| {{N/a}}
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=7698 gral]
| {{N/a}}
| {{N/a}}
| {{N/a|None}}
|-
|-
| mpserver15.flightgear.org
| mpserver15.flightgear.org
| {{N/a}}
| {{yes|Up}}
| North Point, Hong Kong
| North Point, Hong Kong
| {{N/a}}
| {{yes}}
| Hazuki Amamiya
| Hazuki Amamiya
| Hazuki
| Hazuki
| Hazuki
| {{forum link|type=member|u=8400|text=Hazuki}}
| This is a tracker server, not a multiplayer server
| {{N/a|None}}
|-
|-
| mpserver16.flightgear.org
| mpserver16.flightgear.org
| {{yes|Up}}
| {{yes|Up}}
| Kansas City, Missouri, USA
| Kansas City, Missouri, USA
| {{yes}}
| {{no}}
| Rob Dosogne
| Rob Dosogne
| truthsolo
| truthsolo
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=9926 truthsolo]
| {{forum link|type=member|u=9926|text=truthsolo}}
| {{N/a}}
| {{N/a|None}}
|-
|-
| mpserver17.flightgear.org
| mpserver17.flightgear.org
Line 329: Line 341:
| Marius
| Marius
| tuxum
| tuxum
| [http://forum.flightgear.org/memberlist.php?mode=viewprofile&u=11636 tuxum]
| {{forum link|type=member|u=11636|text=tuxum}}
| Offline
| Offline
|-
|-
Line 335: Line 347:
| {{no|Down}}
| {{no|Down}}
| Germany
| Germany
| {{yes}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
| {{N/a}}
|-
| mpserver19.flightgear.org
| {{yes|Up}}
| London, UK
| {{yes}}
| Dr. R0ckso
| drr0ckso
| {{forum link|type=member|u=21111|text=drR0ckso}}
| {{N/a|None}}
|-
| mpserver20.flightgear.org
| {{yes|Up}}
| South San Francisco, California, USA
| {{yes}}
| Marisa Giancarla
| marisag
| {{forum link|type=member|u=21604|text=marisag}}
| {{N/a|None}}
|-
| mpserver21.flightgear.org
| {{yes|Up}}
| Tokyo, Japan
| {{yes}}
| Marisa Giancarla
| marisag
| {{forum link|type=member|u=21604|text=marisag}}
| {{N/a|None}}
|-
| mpserver22.flightgear.org
| {{yes|Up}}
| Munich, Germany
| {{no}}
| Fabian Gilgen
| ivelischt
| ivelischt
| {{N/a|None}}
|-
| mpserver51.flightgear.org
| {{yes|Up}}
| Atlanta, Georgia, USA
| {{yes}}
| Dr. R0ckso
| drr0ckso
| {{forum link|type=member|u=21111|text=drR0ckso}}
| Radio horizon is 414 miles
|-
| mpserver87.flightgear.org
| {{yes|Up}}
| Paris, France
| {{yes}}
| Megaf
| Megaf
| {{forum link|type=member|u=21017|text=Megaf}}
| 2000 nmi Range and Radar Range.
|}
|}


Line 352: Line 418:
Fibertel Argentina apparently uses the port for setup purposes. "It should be open for the user but it might not be fully functional."
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 and the {{Wikipedia|UPnP}} protocol are an "official" usage of the port.   
Port 5000 is a generic port, and neither FlightGear nor the {{Wikipedia|UPnP}} 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 → 5001
A solution would be to spread the ports between the servers; e.g., mpserver01.flightgear.org → 5001, mpserver02.flightgear.org → 5002


See also the [http://forum.flightgear.org/viewtopic.php?f=27&t=24754 forum thread] and {{issue|1617}}.
See also the {{forum link|t=24754|text=forum thread}} and {{issue|1617}}.


== Related content ==
== Related content ==
Line 362: Line 428:
* [[Howto: Set up a multiplayer server]]
* [[Howto: Set up a multiplayer server]]
* [[Multiplayer protocol]]
* [[Multiplayer protocol]]
* [[Howto:Transmit_properties_over_MP]]


{{Appendix}}
{{Appendix}}
Line 371: Line 438:
[[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]]