Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "Howto:Multiplayer"

From FlightGear wiki
Jump to: navigation, search
 
Line 12: Line 12:
 
Where portnumber is usually 5000 or 5002 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 or 5002 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.
  
Servers currently available are: mpserver01.flightgear.org (in Germany), mpserver02.flightgear.org (in Hong Kong) and mpserver03.flightgear.org (East Coast USA) on port 5000 (for the current release of fgfs)
+
Servers currently available are:  
 +
* mpserver01.flightgear.org (in Germany)
 +
* mpserver02.flightgear.org (in Hong Kong)
 +
* mpserver03.flightgear.org (East Coast USA)
 +
 
 +
Port 5000 is usually for the latest stable version of FlightGear. Currently 0.9.10
 +
 
 +
Port 5002 is mainly used for development, i.e. stable version of FlightGear might not work with this server.
  
 
Now, going more slowly for those who are completely lost...  Try the above first, and if it doesn't work, read on.
 
Now, going more slowly for those who are completely lost...  Try the above first, and if it doesn't work, read on.

Revision as of 18:53, 25 May 2006

TODO: provide a short guide about how to use FlightGear's multiplayer features from fgrun

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=in,10,your.ip.address,portnumber
   --callsign=anything 


Where portnumber is usually 5000 or 5002 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.

Servers currently available are:

  • mpserver01.flightgear.org (in Germany)
  • mpserver02.flightgear.org (in Hong Kong)
  • mpserver03.flightgear.org (East Coast USA)

Port 5000 is usually for the latest stable version of FlightGear. Currently 0.9.10

Port 5002 is mainly used for development, i.e. stable version of FlightGear might not work with this server.

Now, going more slowly for those who are completely lost... Try the above first, and if it doesn't work, read on.

First of all, you need to know the IP address of the network interface you're going to be running FG multiplayer over. 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 this address may very well change every now and again - if MP stops working, check this first.

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

Now, all(!) that remains is to configure your router to forward UDP port 5000 or 5002 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 or 5002 (depending on which server you wish to join - add both if you like) 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.

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 

Choose your own callsign - this is currently limited to seven characters.

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 and 5002.

If it's still just not working for you, ask nicely on the FlightGear IRC channel and someone should be able to assist. Multiplayer Map There is a very nice online map which displays the location of online pilots at http://mpmap01.flightgear.org . You will also find this useful to check that you are successfully connecting to the server.


(Courtesy of Stuart Buchanan, copied from the FG Devel mailing list, 04/17/2006)

OK. Using the launcher, after you select your aircraft and starting airport you are presented with a window showing lots of options and the "Run" button on the bottom right.

Above that you'll see a big load of text (which is actually what will be run to start FG). Above that text on the right is a box titled "Multiplayer" with a checkbox beside the word "Multiplayer" and a series of text input fields.

To run multiplayer, do the following.

1) Check the checkbox. This enables multiplayer 2) Choose an identifier for yourself - For example "TODD". 3) Enter the multiplayer server you wish to use. If you are in Europe, use "mpserver01.flightgear.org", in Asia use "mpserver02.flightgear.org", and in the USA use "mpserver03.flightgear.org". They are all connected together, but it is best to use the one closest to you 3) In the text boxes labeled "in" and "out", enter "5000" 4) Press Run.

You should see FG start up as normal. If you point a browser at http://mpmap01.flightgear.org/ and select the server you chose, you should see yourself on the "pilots" tab.

In the instructions above, when you enter values, don't include the quotation marks - i.e. for your callsign you'd enter TODD rather than "TODD".

If that doesn't work, your should see something in the FG text window indicating if FG can't reach the server. Typically this will be due to firewalls, and I don't know enough about Macs to help.

You might want to try the FG IRC channel to see if someone there can help.


TH E FLIGHTGEAR MULTIPLAYER ROUGH HOWTO

2005-09-08