Hi,

My name is Duncan McCreanor. I am employed as a Software Engineer for an 
Australian company where we have been looking at the possibility of using 
Flightgear as the basis for an Air Traffic Control visual simulator. 

We are in the process of putting together a demonstration of the 
possibilities that Flightgear provides. As part of the demonstration a 
colleague and I have been working on the multiplayer aspects of Flightgear.

We have produced a working multiplayer version under Linux. The multiplayer 
code has been created from scratch without using any of the existing 
multiplayer code. It was felt that the existing multiplayer code was too 
platform (Unix/Linux) specific and appeared to slow down the frame rate. The 
multiplayer code we have added uses existing Simgear and plib classes so 
should be platform independent, although we have not tested it on other 
platforms and have not allowed for endian issues.

The design we have implemented allows players to interact without the need 
for a server. If the transmit and receive addresses are set to broadcast, it 
is possible to play multiplayer games on a local network. Point-to-point for 
two players is also possible across the internet.

The ability to send text chat messages to a designated player has been 
allowed for but not implemented.

Although we have not used a server, the design does not need to be changed 
for use with a server.

Command line parameters have been added to set up the multiplayer code. The 
commands are of the form:

--multiplay=in | out,Hz,destination address,destination port
--callsign=a_unique_name


The code has only just been completed. We plan to further test and enhance it 
over the next few weeks.

When coding/testing is completed, how do we go about getting the changes 
reviewed and added to Flightgear?


Below are some examples of startup commands that demonstrate the use of the 
multiplayer facilities.

For two players on a local network or across the internet:
----------------------------------------------------------
Player1:
--multiplay=out,10,192.168.0.3,5500 --multiplay=in,10,192.168.0.2,5501 
--callsign=player1

Player2:
--multiplay=out,10,192.168.0.2,5501 --multiplay=in,10,192.168.0.3,5500 
--callsign=player2


For multiple players on a local network:
----------------------------------------
Player1:
--multiplay=out,10,255.255.255.255,5500 
--multiplay=in,10,255.255.255.255,5500 --callsign=player1

Playern:
--multiplay=out,10,255.255.255.255,5500 
--multiplay=in,10,255.255.255.255,5500 --callsign=playern

Note that the callsign is used to identify each player in a multiplayer game 
so the callsigns must be unique. The multiplayer code ignores packets that 
are sent back to itself, as would occur with broadcasting when the rx and tx 
ports are the same.


Multiple players sending to a single player:
--------------------------------------------
Player1:
--multiplay=out,10,192.168.0.2,5500 --callsign=player1

Player2:
--multiplay=out,10,192.168.0.2,5500 --callsign=player2

Player3:
--multiplay=out,10,192.168.0.2,5500 --callsign=player3

Player4 (rx only):
--multiplay=in,10,192.168.0.2,5500 --callsign=player4

This demonstrates that it is possible to have multiple instances of 
Flightgear that send to a single instance that displays all the traffic. This 
is the sort of implementation that we are considering for use as a tower 
visual simulator.


For use with a server (when one is created):
--------------------------------------------
Player1:
--multiplay=out,10,serveraddress,6000 --multiplay=in,10,myaddress,5500 
--callsign=player1

Player2:
--multiplay=out,10,serveraddress,6000 --multiplay=in,10,myaddress,5501 
--callsign=player2

Playern:
--multiplay=out,10,serveraddress,6000 --multiplay=in,10,myaddress,5502 
--callsign=playern

The server would simply act as a packet forwarding mechanism. When it 
receives a packet, it sends it to all other active players.


Regards,
Duncan.



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to