Howto:Multiplayer: Difference between revisions

Jump to navigation Jump to search
More cleanup
No edit summary
(More cleanup)
Line 60: Line 60:
: Port that data is either being sent or received through.  Usually set to <code>5000</code> and above.
: Port that data is either being sent or received through.  Usually set to <code>5000</code> and above.


{{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:
== Advanced usage of multiplayer ==
{{WIP}}
=== 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.
 
Command line parameters for the first 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,your.ip.address,5000 --multiplay=in,10,your.ip.address,5001 --callsign=Test1
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.
Command line parameters for the second instance:
[[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]]
<syntaxhighlight lang="bash">
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>'''.
--multiplay=out,10,your.ip.address,5001 --multiplay=in,10,your.ip.address,5000 --callsign=Test2
</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.  As you can't access the confirguration 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.]]


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 add an arbitrary number of channels to mirror your flight onto other servers, e.g. to a private fgms server using
}}
<syntaxhighlight lang="bash">
--multiplay=out,10,my.private.server.ip,5000
</syntaxhighlight>
 
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   
<syntaxhighlight lang="bash">
--multiplay=in,10,,5000
</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 [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!

Navigation menu