Board index FlightGear Development New features

AI & MP Dogfighting now working! Bombable ships, aircraft...

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: AI Dogfighting--new download w/bombable ships, aircraft, etc

Postby xiii » Wed Sep 02, 2009 10:40 pm

Hehe, some time when flying formation, you can see your wingman following you... as your wingman see you following him. Well, that's an extreme case, but it happens from time to time.

Anyway, keep the good work on !
Alexis
If the engines are Pratt and Whitney, the seats best be Martin Baker
xiii
 
Posts: 472
Joined: Tue Jan 08, 2008 11:04 pm

Re: AI Dogfighting--new download w/bombable ships, aircraft, etc

Postby flug » Thu Sep 03, 2009 12:50 pm

AndersG wrote:I think $FG_ROOT/Nasal/mp_broadcast.nas


OK, that did it. It's all working now--Sopwith Camel dogfighting.

Planes report damage to each other and if you see your MP partner start to smoke or catch fire, he sees it himself on his own computer.

Works pretty well as far as we've tested it so far and also allows several people to mix it up at once.

mp_broadcast seemed to work perfectly for this type of application, though I think it has too much lag for my other idea (showing the nearby shots/explosions that the remote MP aircraft detects close to it).

Download here:
http://brenthugh.com/flightgear/bombable3g.zip
flug
 
Posts: 219
Joined: Wed Jun 17, 2009 2:06 am

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby lqiyun » Mon Sep 14, 2009 2:50 pm

Oh my gosh! So THIS was what I've been missing all the while long, while my other computer's being repaired!!! Man, oh man, I'm so gonna return to flightgear once my newer computer's repaired, and once my exams are over~! Gosh, I miss FlightGear just so much! :D

Oh, and, is it possible to make the Fokker Dr. I Triplane "bombable" as well? The Triplane's one of my fav WWI "guys" :D

Tchao~!
QiYun

Flightgear Callsign: Old-Man

Fight on and fly on to the last drop of blood and the last drop of fuel, to the last beat of the heart.
— Baron Manfred von Richthofen.
User avatar
lqiyun
 
Posts: 250
Joined: Fri Nov 14, 2008 5:09 pm
Location: Singapore

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby yourgod » Tue Sep 15, 2009 9:36 pm

I'm very interested in this, and I'll give it a try here in the next few weeks. Might I interject that you take into account that people have the source code to this, and with a small bit of code could automatically knock down every person who has this option turned on.

When you start talking about multiplayer, a lot of security issues come into play. You need to make sure you take into account that there are bad apples that will exploit this system. Imagine someone logging in with a plane that flys 3 times the speed of an SR-71, is immune to damage, and fires 20Megaton nukes at a rate of 30000 rounds per minute.. I've seen it. You won't get much flying done with them around. If you leave the protocol open to that attack vector, it's just a matter of time until someone exploits it and renders the whole multiplayer combat experience useless.
Callsign: YOURGOD, (YOURGO if you only recognize 6 characters)
TransGear Airways site: http://transgear.treborlogic.com/
FG related projects:
Planes: Douglas DC-8-73
Code: Hurricane simulation weather enhancement
User avatar
yourgod
 
Posts: 1016
Joined: Wed May 13, 2009 8:09 pm
Callsign: YOURGOD

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby aok1 » Wed Sep 16, 2009 6:21 pm

Time for some feedback. I have been enjoying myself thoroughly with this, so thanks very much! This is a great addition!

Some issues I am having:

* All damage-smoke stays black, there is no fire/coloured smoke (as i saw in the screenshot)

* The planes do not go down when damaged and/or destroyed, they stay at altitude. No matter what value
I give to "damagedAltitudeChangeMaxRate_meterspersecond :" it seems to make no difference.
Terrain avoidance does seem to be damaged: at low alt they will crash into mountain/hills.
* I have only seen planes going down, e.g. alt=0 (this is very abrupt! -no downward slope), with the seahawk:
it turns out that its bullets register impact as droptank.

If I can help testing things, just let me know.

This is what it currently looks like on my end: http://www.youtube.com/watch?v=r5Sz0uzu ... annel_page
Watch my videos and look at screenhots if you're into that sort of thing :)
aok1
 
Posts: 105
Joined: Sun Apr 19, 2009 11:02 pm

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby Fahim Dalvi » Thu Sep 17, 2009 9:25 am

yourgod wrote:When you start talking about multiplayer, a lot of security issues come into play. You need to make sure you take into account that there are bad apples that will exploit this system. Imagine someone logging in with a plane that flys 3 times the speed of an SR-71, is immune to damage, and fires 20Megaton nukes at a rate of 30000 rounds per minute.. I've seen it. You won't get much flying done with them around. If you leave the protocol open to that attack vector, it's just a matter of time until someone exploits it and renders the whole multiplayer combat experience useless.


Well, As far as I see it, we need to make changes to the -set file to enable collision. Since we can have multiple -set files for a Aircraft, we can have a "Dog-Fight" version, and a normal one.
User avatar
Fahim Dalvi
 
Posts: 1352
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby flug » Sun Sep 20, 2009 3:35 pm

aok1 wrote:Time for some feedback. I have been enjoying myself thoroughly with this, so thanks very much! This is a great addition!

Some issues I am having:

* All damage-smoke stays black, there is no fire/coloured smoke (as i saw in the screenshot)


Yes, I did something to that smoke file towards the last revision & I'm not sure what. The file just needs a little tweak of some sort.

aok1 wrote: * The planes do not go down when damaged and/or destroyed, they stay at altitude. No matter what value
I give to "damagedAltitudeChangeMaxRate_meterspersecond :" it seems to make no difference.


Part of the problem is these routines are just riding on top of the regular AI flight routines and giving them "suggestions". The AI routines take certain suggestions better than others.

The aircraft will crash eventually but it is more like if their engines were turned off and they just gradually lose altitude and, when they get to the ground, crash, rather than sort of flying all apart and falling straight down right then & there.

The "real" solution would be to modify the AI flight routines directly rather than trying to give them hints via an external routine.

At first I made the planes slow down & go down rather more abruptly, but this really looked pretty fake. Now at least you can sort of imagine that they've just lost their engines.

Also it's fairly hard to make one single routine that looks & works convincingly for all type of aircraft (*and* ground vehicles)--which is how it works now.

aok1 wrote:Terrain avoidance does seem to be damaged: at low alt they will crash into mountain/hills.


Yes, I'm not sure what is causing this as it shouldn't ever actually crash in this situation. However you can solve it for a particular aircraft by giving a higher minimum altitude and/or specifying a short update time (1/8 or even 1/16 second for very fast aircraft). However the shorter update time can have a rather large effect on framerate.

The ultimate cause of this is the AI aircraft routines respond *very* slowly to suggestions to move to a different altitude. So instead of just giving hints to the AI routines (as bombable does now) probably a "combat" AI routine that would respond more vigorously in altitude etc. would be the real solution.

* I have only seen planes going down, e.g. alt=0 (this is very abrupt! -no downward slope), with the seahawk:
it turns out that its bullets register impact as droptank.


Hmm, I'm not sure what would cause this & I haven't seen it myself. I'll have to try it.

If I can help testing things, just let me know.

This is what it currently looks like on my end: http://www.youtube.com/watch?v=r5Sz0uzu ... annel_page
That's a pretty cool video!
flug
 
Posts: 219
Joined: Wed Jun 17, 2009 2:06 am

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby flug » Sun Sep 20, 2009 3:55 pm

lqiyun wrote:Oh, and, is it possible to make the Fokker Dr. I Triplane "bombable" as well? The Triplane's one of my fav WWI "guys" :D


It's already possible to use fly any plane as the "shooter" as long as it is already set up to shoot bullets, missiles, etc.

So you can already, for instance, fly the SPAD VII on the sopwith camel invasion mission and use the SPAD to shoot down the Camels.

I think the Fokker Triplane will work in that same way, too, but I haven't tried it.

It takes just a little work to be able to use the Triplane as a target as well.

My thought for now is to refine things using the aircraft, ships, & vehicles I've already modded first, before adding it to a whole bunch more.

But, again, that only affects the AI "target" aircraft. As far as which aircraft you can fly on the missions, that is only limited by the armament that is (or is not) included in the aircraft already. It doesn't require any change at all to the bombable routines to get any aircraft working--simply making the guns/armament of each aircraft work.

UPDATE: I tried with the Triplane (FKDR1) in the CVS and that plane doesn't have any working guns. However I've added guns (about half hour's work just to take the gun submodels & code from the Sopwith & move them over) and at least for the JSB model it works well.

The UIUC model seems to have a problem, same as I observed in the Sopwith Camel UIUC model, where the guns shoot OK but they are weirdly aiming in the wrong direction. Not sure what causes that.

I'll try to include the weaponized FKDR1 in the next bombable release if I remember.

Also long term I want to include all this little mods I've made to various aircraft, joysticks, etc. in the CVS version of FlightGear.
Last edited by flug on Sun Sep 20, 2009 6:56 pm, edited 1 time in total.
flug
 
Posts: 219
Joined: Wed Jun 17, 2009 2:06 am

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby lqiyun » Sun Sep 20, 2009 4:03 pm

just asking, are the guns and etc in the sopwith camel available in the CVS version? or do I have to download them and edit it myself?..

Cheerio!
QiYun :D
QiYun

Flightgear Callsign: Old-Man

Fight on and fly on to the last drop of blood and the last drop of fuel, to the last beat of the heart.
— Baron Manfred von Richthofen.
User avatar
lqiyun
 
Posts: 250
Joined: Fri Nov 14, 2008 5:09 pm
Location: Singapore

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby flug » Sun Sep 20, 2009 4:08 pm

yourgod wrote:I'm very interested in this, and I'll give it a try here in the next few weeks. Might I interject that you take into account that people have the source code to this, and with a small bit of code could automatically knock down every person who has this option turned on.

When you start talking about multiplayer, a lot of security issues come into play. You need to make sure you take into account that there are bad apples that will exploit this system. Imagine someone logging in with a plane that flys 3 times the speed of an SR-71, is immune to damage, and fires 20Megaton nukes at a rate of 30000 rounds per minute.. I've seen it. You won't get much flying done with them around. If you leave the protocol open to that attack vector, it's just a matter of time until someone exploits it and renders the whole multiplayer combat experience useless.


Yes, I've been thinking about this a little.

The other issue my son & I have been having in testing & just using it for fun, is each person can either reset or change location at will.

Unless you have bombable switched on this isn't really an issue. And you do have to keep in mind that the only real affect bombable has on your plane now is #1 damage smoke (which you can turn off) and #2 when you reach 100% damage your engines switch off (and you can just switch them back on again immediately if you like).

So the system right now is really set up just to pass information back & forth a little, not really to enforce it. The idea is anyone can make rules about dogfighting they want and anyone participating will have to self-enforce them as the program doesn't enforce much at all. It's rather like groups like the Society for Creative Anachronism do when engaging in mock fights and battles.

However--two rather simple solutions (that go beyond the scope of bombable itself):

1. Allow you to choose "ignore" for any other person on the multiplayer network.

Thus, anyone who engages in this type of annoying behavior, you just put them on your ignore list.

2. Allow you to join multiplayer as "invisible", meaning that you can see other players but they can't see you (nor does anything you do affect them).

That way people who want to spend time "blasting" "real" targets can get their jollies while everyone else doesn't even know (or need to know) what they are doing.

The thing is you can do this already (ie take your F-16 and spend your time shooting at other planes flying around, say, KSFO). Since the weapons don't transmit over multiplayer it has no effect whatsoever on the other player except to make them wonder why the F-16 is flying nearby in a strange manner.

Another, somewhat more complicated solution:

3. When you want to dogfight, you extend that invitation to other player(s) in your area. Then only those other players who accept the invitation would be damaged by your weapons, or can damage you.
flug
 
Posts: 219
Joined: Wed Jun 17, 2009 2:06 am

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby lqiyun » Sun Sep 20, 2009 4:15 pm

Hmm, how about this: people who want to dogfight enable their bombable script... People who don't want to dogfight just turn it off or delete/rename it?... :)
QiYun

Flightgear Callsign: Old-Man

Fight on and fly on to the last drop of blood and the last drop of fuel, to the last beat of the heart.
— Baron Manfred von Richthofen.
User avatar
lqiyun
 
Posts: 250
Joined: Fri Nov 14, 2008 5:09 pm
Location: Singapore

Re: AI Dogfighting--new download w/bombable ships, aircraft, etc

Postby 2011futuremarine » Sun Sep 20, 2009 10:47 pm

flug wrote:By the way, the S.P.A.D. VII is a great choice for hunting the Sopwith Camels. The S.P.A.D is just a little faster than the Camels, making it a little easier to catch up with them.
(S.P.A.D VII is in the current CVS version.)


Is there any place that the SPAD is downloadable for v1.9.1? thanks :)
Aircraft: primarily military
User avatar
2011futuremarine
 
Posts: 969
Joined: Thu Jun 05, 2008 9:19 pm
Location: USA
Callsign: Dodger4

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby flug » Mon Sep 21, 2009 4:53 am

lqiyun wrote:just asking, are the guns and etc in the sopwith camel available in the CVS version? or do I have to download them and edit it myself?..


The working guns etc are in the bombable download, ie:

http://brenthugh.com/flightgear/bombable3g.zip

If you download that & install as instructed, then you should see the Sopwith Camel in your aircraft list & if you choose the YASim version of the Camel it has working guns.
flug
 
Posts: 219
Joined: Wed Jun 17, 2009 2:06 am

Re: AI Dogfighting--new download w/bombable ships, aircraft, etc

Postby flug » Mon Sep 21, 2009 6:22 am

2011futuremarine wrote:
flug wrote:By the way, the S.P.A.D. VII is a great choice for hunting the Sopwith Camels. The S.P.A.D is just a little faster than the Camels, making it a little easier to catch up with them.
(S.P.A.D VII is in the current CVS version.)


Is there any place that the SPAD is downloadable for v1.9.1? thanks :)


I don't know of anywhere it is all packaged together except the CVS. That is here:

http://cvs.flightgear.org/viewvc/data/Aircraft/SPAD-VII/

However it's a pain in the you-know-what to download from there without actually installing the CVS software etc. (You have to click on & download each file separately, then put each in its correct folder, etc.).

Maybe I'll include in the next release of bombable just for convenience.

If we had the SPAD plus the Fokker Triplane and the Camel, we could have some really nice WWI dogfights.
Last edited by flug on Mon Sep 21, 2009 2:47 pm, edited 1 time in total.
flug
 
Posts: 219
Joined: Wed Jun 17, 2009 2:06 am

Re: AI & MP Dogfighting now working! Bombable ships, aircraft...

Postby aok1 » Mon Sep 21, 2009 10:43 am

Thanks flug.

flug wrote:Now at least you can sort of imagine that they've just lost their engines.


Oh, so much more is happening! They actually bail out sometimes. And one time I had three of them on my six! Made a narrow escape, suffered damage and had the worst landing ever. --that reminds me: is it possible to trigger system failures in the mp-dogfight version?
Watch my videos and look at screenhots if you're into that sort of thing :)
aok1
 
Posts: 105
Joined: Sun Apr 19, 2009 11:02 pm

PreviousNext

Return to New features

Who is online

Users browsing this forum: No registered users and 2 guests