Es/Howto: Multijugador

From FlightGear wiki
Revision as of 20:04, 27 September 2009 by Aepcam (talk | contribs) (Created page with 'With the '''Multiplayer''' function of FlightGear you are able to see other pilots and vice-versa. This makes it possible to fly in formation, [[Howto: Air-Air Refueling|conn…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

With the Multiplayer function of FlightGear you are able to see other pilots and vice-versa. This makes it possible to fly in formation, connect to tankers controlled by real people or contact real ATCers to ask for landing/takeoff clearence.

If you are interested in hosting your own Multiplayer server, you may want to check out Howto: Set up a multiplayer server.

Multiplay may cause extreme framerate drops, during loading of a new aircraft. Especially heavy models will cause lag. Therefore it is suggested to fly in Europe or somewhere other than KSFO where there are fewer pilots flying around.

Servers

Please Note: The multiplayer servers are interconnected; 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 geographically closest to you, has the lowest latency (ping time) or is the quietst.

Server Location Tracked Maintainer Comments
mpserver01.flightgear.org Germany Yes Oliver Schroeder
mpserver02.flightgear.org Hong Kong Yes Pigeond Currently Down Due to Bandwidth Restrictions.
mpserver03.flightgear.org Germany Yes Down for a long period of time
mpserver04.flightgear.org UK Yes Jon Stockill
mpserver05.flightgear.org Dallas, Texas, USA Yes Brant Gipson
mpserver06.flightgear.org Sweden Yes Anders Gidenstam Only tracked on port 5002
mpserver07.flightgear.org Wisconsin, USA Yes Tom Betka
flightgear.mxchange.org Frankfut am Main, Germany Yes Roland Also HTTP on 5001 and 80

Use this link to check if the MP servers are online.

MPMap screenshot

Multiplayer Map

1rightarrow.png Hay un artículo MPMap .

There is a very nice online map which displays the location of online pilots at mpmap01 and/or mpmap02. You will also find this useful to check that you are successfully connecting to the server.

Using the Windows launcher / fgrun

Multiplayer options in FG Launcher
  1. Select your aircraft and starting airport as normal in Fgrun.
  2. 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.
  3. Click run and you'll soon be flying with other pilots!

To confirm that it's working, you can go to the multiplayer map at; http://mpmap02.flightgear.org/ (in Hong Kong). You will also notice chat messages that say "Hello" indicating pilots that are online and then as they join. You may wish to use a different server (i.e. "Hostname" entry);

For more advanced settings, the Advanced > Network tab can be opened. You are able to remove the in or out lines only through this method for example.

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;

   --multiplay=out,10,server.ip.address,portnumber
   --multiplay=in,10,your.ip.address,portnumber
   --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.

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

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'll be using for multiplayer FG. 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 your ISP might not give you the same IP address each time - 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 - write 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 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.

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.

If it's still just not working for you, ask nicely on the FlightGear IRC channel and someone should be able to assist.

Multiplayer Chat

1rightarrow.png Hay un artículo Chat Menu .

To chat with other pilots, go to the "View" menu and select "Chat" at the bottom of the menu. Note that the other pilots may not have their chat box open, so they may not see your messages. NOTE: Multiplayer chat is not supported by FlightGear 0.9.10 or older.

The shortcut for chatting is "_" (underscore) and it brings up a small window where you can type. 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 View -> Chat. So if you think you've missed anything, go check there.