Board index FlightGear Development Tutorials and missions

Online Multiplayer Missions

Interactive in-sim tutorials and missions

Online Multiplayer Missions

Postby Bomber » Tue May 13, 2014 7:10 pm

Being honest I don't see the point in flying missions off-line as the real pleasure/angst in success/failure, comes from the unpredictability that arises from human interaction.... nothing beats beating another human..

Another story of online play....

I'm flying a lone B24 nap of earth mission to a target that just happens to be relatively close to a long canyon... close enough that if I jump out of the canyon at the right point I couldn't be intercepted in time to prevent me dropping my load.... So I've flown down the canyon real slow, flaps deployed so as I can get round some of the bends, jumps out the canyon, bombs the target, takes some damage but not enough to worry about and then drops back into the canyon for the return trip... But it's like kicking a hornets nest and they're after me, but they're faced with the dilemma if they 'boom and zoom' they can't get a good shooting angle because of the canyon walls and if they slow down and enter into the canyon and fly slow from my 6, my top bottom and rear turrets have such concentrated fire power that it's not worth the effort. Now the problem is when the canyon runs out I'm doomed, a sitting duck flying at the slowest speed possible with flaps extended. So when the opportunity arises I jump out the canyon do a crazy suicidal turn and back in again going in the opposite direction... Well this drives em wild and the chatter is unbelievable. This lasts for about what seems like hours, but more than likely 20 minutes, with me slowly losing engines and turrets until finally they give up and I make my escape.

That can't be scripted...

I'd like to see an environment where when you join online your machine adds to the 'AI power' of the script engine... For example the server runs 4 scripts (made-up number) and when each individual joins online their machine can run 2 scripts (made-up number)... So the more people online, the more supporting AI online that occurs, and the fun snowballs

Imagine 12 pilots all turn up wanting to fly fighters (as they're more exciting), the AI script engine can run 4 server and 24 pilot machine planes, totalling 26 target planes...

And remember scripts don't have to be planes, could be a ship convoy or trains... or random bushfires.

"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Posts: 1934
Joined: Fri Dec 14, 2007 7:06 pm
OS: Windows XP and 10

Re: Online Multiplayer Missions

Postby Hooray » Tue May 13, 2014 7:45 pm

I do get your point, and in fact I've made friends through online interaction, too. But it's kinda pointless currently to debate the merits of such a system, because our existing architecture is fairly inadequate to pull something like this off. Yeah, having a restricted 5-10 player shared MP environment may be possible to come up with by using some creative workarounds - but overall, our existing MP system is not really a good foundation for something like that.

In very simple non-technical terms, our fgms server acts like a "mirror" in the conventional sense, it isn't very much state-aware and cannot be easily ab/used to share/propagate/replicate other state, beyond what is currently hard-coded - that is why people had to come up with "generic properties" and the mp_broadcast system.

We hit some of those limitations back when we were working on extending fgms to use RL traffic to populate our world:
Subject: Populate AI Traffic with real traffic
Hooray wrote:Image

For example the server runs 4 scripts (made-up number) and when each individual joins online their machine can run 2 scripts (made-up number)... So the more people online, the more supporting AI online that occurs, and the fun snowballs

it's an interesting idea, and that's funnily something that we have currently hard-coded to prevent, i.e. "local" AI traffic showing up on other MP computers.
In theory, it would require very minor changes to propagate local AI state across MP, but that's not what our MP network is designed for capacity-wise - but in a local/LAN setting, you could probably have a handful of machines all running the bombable script locally, while those AI bots could all show up on MP and attack non-AI/human players in a joint-effort - they would have a consistent "world" picture, because of all the shared MP state, with a few AI bots disappearing once the corresponding player disconnects.

In terms of coding, that's under 1 hr of C++ coding, and probably less than 5-10 hrs of Nasal coding to teach bombable bots to attack non-bots across MP.
But again, that's something that's more appropriate for a LAN setup due to the issues of the MP network (latency/traffic being just two of these).

Overall, this is all stuff that is beyond the scope of scripted tutorials/missions like you say - but our MP system has some built-in boundaries that are hopefully resolved over time by adopting HLA.
The short-term solution, that would require C++ coding, would be making fgms itself script-able and turning the whole MP setup into just a property-server that can exchange arbitrary properties in a publish/subscribe fashion. That would get rid of all the existing limitations, making the server just another script-able "remote property tree". We actually played with it once - a long time ago, but we've all been hoping for HLA to make such workarounds unnecessary.

But a script-able fgms server would not be all that difficult to come up with for someone familiar with C++ (and ideally Nasal), obviously the server would then also have a fgdata dependency (aircraft, fdm, scripts and terrain) - or bots would not have any sane way to interact with human players.

You mentioned elsewhere "what if the existing MP system could be improved by /someone/" - and that's really the 2-3 main missing things to make it happen:
  • fgms as a a remote property tree server
  • with publish/subscribe support
  • and scriptable, ideally using Nasal

Anything else could be built on top of this (including even shared state worlds, registrations required etc) - it's not exactly difficult to do this, but we've never done it (despite many discussions and quite a few experiments) because we were hoping to have a "proper" solution. But if this had been done 5+ years ago (or even just when I first talked to you T4T guys about it :D ), there would still not be any real technical issues today that couldn't be overcome through creative use of these three components.

Realistically, an online MP server would probably even benefit from supporting "missions", and possbily even having a "mission generator" that combines different objectives. And that stuff simply requires scripting. But these days nobody is very eager to work with fgms - but what could be done is linking it into FG as a subsystem, so that people can host their own MP sessions without going through the hassle of setting up the MP server first - that is something that F-JJTH did for FGCom, too - and at that point, the MP server would become a so called "SGSubsystem" and could also use FG scripting through Nasal and access other data (aircraft, FDM, terrain or even bombable).
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Posts: 11354
Joined: Tue Mar 25, 2008 8:40 am

Return to Tutorials and missions

Who is online

Users browsing this forum: No registered users and 1 guest