Howto:Multiplayer: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (→‎Servers: + server10)
mNo edit summary
Line 88: Line 88:
[[Image:Multiplayer.jpg|thumb|300px|Multiplayer options in [[FlightGear Wizard|FG Launcher]]]]
[[Image:Multiplayer.jpg|thumb|300px|Multiplayer options in [[FlightGear Wizard|FG Launcher]]]]
#Select your [[aircraft]] and starting airport as normal in [[FlightGear Launch Control|Fgrun]].
#Select your [[aircraft]] and starting airport as normal in [[FlightGear Launch Control|Fgrun]].
#On the next screen, tick the "Multiplayer" box. Also tick the "AI models" box or you will not be able to see the other pilots' aircraft. Enter the callsign of your choice, enter mpserver01.flightgear.org in the "Hostname" box and 5000 into both the "in" and "out" boxes.
#On the next screen, tick the "Multiplayer" box. Also tick the "AI models" box or you will not be able to see the other pilots' aircraft. Enter the callsign of your choice (check [http://fgfs.i-net.hu/modules/fgtracker/ this page] to see whether it is already in use or not. Do not pick a callsign that is already used!), enter mpserver01.flightgear.org in the "Hostname" box and 5000 into both the "in" and "out" boxes.
#Click run and you'll soon be flying with other pilots!
#Click run and you'll soon be flying with other pilots!


Line 98: Line 98:


== Using fgfs from the command line ==
== Using fgfs from the command line ==
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;
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;


    --multiplay=out,10,server.ip.address,portnumber
--multiplay=out,10,server.ip.address,portnumber
    --multiplay=in,10,your.ip.address,portnumber
--multiplay=in,10,your.ip.address,portnumber
    --callsign=anything  
--callsign=anything  


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. Please note that although this limitation has been removed in the most recent versions of the FG server; you should still specify a valid (non-loopback, i.e. not 127.0.0.1) IP address to keep the FG client happy.
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. Please note that although this limitation has been removed in the most recent versions of the FG server; you should still specify a valid (non-loopback, i.e. not 127.0.0.1) IP address to keep the FG client happy.


With the latest FlightGear (at least with OSG), you can also leave your.ip.address blank. FlightGear will then listen on all network interfaces:
With the latest FlightGear (at least with OSG), you can also leave your.ip.address blank. FlightGear will then listen on all network interfaces:


    --multiplay=in,10,,5000
--multiplay=in,10,,5000
 
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... ===
Line 119: Line 120:
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.
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.


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"
* 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"
* Under '''Windows XP''' or '''Vista''', 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.


Under Windows XP, click start, run, and type "cmd". In the terminal window which appears, type "ipconfig" This should show you your IP address - write it down.
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.


With 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).
 
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.
 
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.
Line 135: Line 134:
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;


fgfs --callsign=MyName --multiplay=in,10,192.168.0.2,5000 --multiplay=out,10,mpserver02.flightgear.org,5000 --airport=KSFO --runway=28R --aircraft=hunter


    fgfs --callsign=MyName --multiplay=in,10,192.168.0.2,5000  --multiplay=out,10,mpserver02.flightgear.org,5000 --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!
 
Choose your own callsign - this is currently limited to seven characters.<br>


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;


    Initialising john51a using 'Aircraft/ufo/Models/ufo.xml'   
Initialising john51a using 'Aircraft/ufo/Models/ufo.xml'   
    FGMultiplayRxMgr::ProcessRxData - Add new player. IP: 10.0.0.36,   
FGMultiplayRxMgr::ProcessRxData - Add new player. IP: 10.0.0.36,   
    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!

Navigation menu