Sign in to follow this  
ZG862

Multi Player Architecture

Recommended Posts

Hi all.

 

Afraid I've been thinking again. This time I've been wondering how you'd go about getting an improved multi-player experience (with a simpit - but it turns out this applies to a more traditional setup too). I started by thinking about what data is actually shared when, for example FSX is set up for multi-player. I realised that each host must implement its own flight dynamics for the local aircraft but get given the position of remote players periodically over the network. Other than the definition of which aircraft the remote players are flying and any voice communication between participants, this seems to be pretty much all that is sent along the wire.

 

Since the flight dynamics engines seem to take weather into account, each host must use it's local weather engine to incorporate the effect of winds and turbulence. Each host must also use its local definition of terrain and textures.

 

However, this does not appear to me to be ideal and at this point I needed a diagram to work through what is required. This is what I came up with:

 

MultiPlayer_zpsa27c6230.jpg

 

 

Blue squares are external entities - people or services. The purple bits are local and private to the local pilot and red bits should be shared by all participants. Arrows show information flow.

 

So what?

 

Well, firstly it seems to me nonsensical that weather is not shared between participants. I may be wrong (PLEASE CORRECT ME) but it seems to me that in FSX for example, lets say the active runway was 27 and 2 players were flying identical aircraft; one player could set the wind to be 270/10kt and another to 090/20kts. A formation take-off would be, er,quite tricky.

 

The 'weather problem' extends to air traffic control too. In the above example, what would a tower controller report during the take off clearance? I'm guessing this may be one reason why we can't get the benefit of a product like VoxATC in a multi-player set up.

 

So let's move on to ATC whilst we're here. ATC has a closely coupled relationship with AI traffic. For a controller (real or simulated) to give real players a clearance to take off or land, they must be able to interact with that AI A380 on final. Should you inadvertently stumble onto the runway, you'd kind of expect the tower to tell the landing aircraft to go around. To do this, firstly ATC needs to know where you (real pilot) are and secondly to be able to get the AI aircraft to respond to an instruction. This suggests to me that a simulator's AI engine needs to be made "ATC-aware" but logically separate from the ATC function. Incidentally, I'm not suggesting that a recreational simulator should handle accidents - diverting aircraft and coordinating emergency vehicles etc., although it would be an interesting intellectual challenge!!

 

The module I've labelled "Position Manager" represents what I suspect is the primary function of multi-player code in today's sims. It is responsible for knowing where all vehicles in the sim are, where they're moving to (i.e. their 3 dimensional velocities) and which participants need to know about which objects. I think FSX does this by telling everyone about every object which seems to me to be inefficient. If I'm sat on the apron of my local field doing startup checks, my machine does not need to know that there's a baggage cart waiting to cross a taxiway at an airfield 10 miles away although I should probably be able to see that 340 laying contrail lines way up in the blue. 

 

I suppose this brings me back to AI. Do all AI generators have absolute paths for the vehicles they control? Do they use the local FDE? As well as the point I made above about AI aircraft (and some airport vehicles come to think of it) needing to be able to respond to ATC instruction, some of the AI movement would seem to need to be relative to the positions of types of objects in the sim. For example a generator should be towed from a store to the side of a combat aircraft wherever it is parked on the pan until the aircraft has been started at which point it could be returned to the store. An AI GA aircraft might spend ABOUT an hour doing circuits on the ACTIVE runway rather than Rwy 27 between 09:23 and 10:23 regardless of wind direction.

 

The diagram and thinking are not fully baked - animations, effects and missions are still buzzing around my head - but I suppose I was wondering if anyone else can see any value in developing standards around a model like this? I figure that with just a sprinkling of common architecture, there is no particular reason why a FSX pilot couldn't fly alongside an XP10 one and a P3D one, all looking out of their windows to compare the flight models.

 

Z

 

 

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Just by way of a bit of a postscript, I did a bit of reading about VATSim and believe that the pilot client is effectively my position manager and comms server combined. Call me dimbo but I didn't realise that FSX/P3D clients and XP10 clients can indeed share common airspace. This implies to me that they are indeed just interchanging position and each client is able to plot the location/orientation of remote vehicles relative to it's own local terrain model.

 

Also, anyone know if AI traffic uses the flight dynamics engine? Or do they just travel directly from point A to point B with a little jiggery pokery for landing flares etc?

Share this post


Link to post
Share on other sites

Looks like I'm not entirely alone in this thinking (no surprises there):

 

http://wiki.flightgear.org/images/1/1e/New_FG_architecture.pdf

 

This appears to have been written in back in 2006 and I don't really know to what extent it was implemented. Nevertheless, it does seem to support this notion of how the basic design of the sim needs to evolve to provide rich features such as AI traffic and ATC to the multiuser environment.

 

In answer to my own 1st question in the previous post, I came across a forum article (can't now find the link) that suggested that XP10 does use the FDE for AI traffic and it was implied that FSX does not - which would explain why it apparently creates such a performance hit in XP. I do understand why Laminar might implement AI like this though; the aircraft in front of you is going to look an awful lot more realistic if it is taking into account the big cross wind that might be there.

 

Z

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this