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 & MP Dogfighting now working! Bombable ships, aircraf

Postby flug » Sun Oct 02, 2011 11:35 pm

skibot wrote in Sat Oct 01, 2011 1:14 pm:Hello,
Can anybody make bombable f 15 with minigun, sidewinders and mavericks?

I can't do that, i've spent whole day trying to cut some code from A6M2b and paste it to my F15 but it stil doesn't work.
Actualy i try to make Multiplayer scenario of Desert Storm operation, so i need bombable F15 and Mig29. I've just made livery to f15.
If anybody help i'll be very broud, and I could finish my scenario as soon as possible!


I thought it might be helpful to a number of people who want to get Bombable working with different aircraft, so I wrote down the instructions for making an aircraft Bombable in some detail here (it also does the job for the F15E from FGUK, at least in basic fashion, since Dutch suggested that as a starting point):

http://wiki.flightgear.org/Howto:_Addin ... r_Aircraft

Also, Bombable has a page on the FlightGear wiki now:

http://wiki.flightgear.org/Bombable
flug
 
Posts: 218
Joined: Wed Jun 17, 2009 1:06 am

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

Postby Vodoun da Vinci » Mon Oct 03, 2011 12:01 am

Flug,

Thanks for the continued development of Bombable for FlightGear...the continued support and upgraded functionality and bug fixes are much appreciated! :D I'm having a ball with the Script and there is enough functionality and eye candy to keep me busy (I'm obsessed - I admit it) with FGFS and the latest Bombable for months now.

Here's my latest use of the goodies from the last version. I'm loading the newest as I type this.



I have flying P-51's, P-38's, P-47's and others now and hope to have Bombable shipping added to my latest in a few days/weeks. I'm having too much fun with your hard work and contribution.

Did I say thanks? :lol:

VooDoo
FGFS version 2.4.0 on Windows 7
Primarily Flying Warbirds, Jet and Prop - Visit: http://www.fguk.eu
VooDoo's FGFS/FGUK Movies!: http://www.youtube.com/user/VooDoodaVinci?feature=mhee
"Imagination is more important than knowledge"
A. Einstein
User avatar
Vodoun da Vinci
Retired
 
Posts: 405
Joined: Thu Mar 25, 2010 3:29 pm

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

Postby flug » Mon Oct 03, 2011 5:02 am

skibot wrote in Sat Oct 01, 2011 1:14 pm:Hello,
Can anybody make bombable f 15 with minigun, sidewinders and mavericks?

I can't do that, i've spent whole day trying to cut some code from A6M2b and paste it to my F15 but it stil doesn't work.
Actualy i try to make Multiplayer scenario of Desert Storm operation, so i need bombable F15 and Mig29. I've just made livery to f15.
If anybody help i'll be very broud, and I could finish my scenario as soon as possible!


I mentioned in another message that because you & Dutch mentioned the F-15 I used it in the tutorial about how to add Bombable to an aircraft:

http://wiki.flightgear.org/Howto:_Addin ... r_Aircraft

I got fooling around with the F-15 files a little more and ended up improving the guns and adding a quick'n'dirty implementation of the MK-82 500 lb bomb and also the AIM-9 sidewinder. So it's bombable AND has those weapons. The sidewinder FYI is unguided and un-powered (it just shoots out real fast, no 'propulsion', which along with guidance could be implemented in FG, but it would take some time) and the implementation is a bit of a hack, but I surprised myself and actually managed to bring down a couple of planes with it even in the raw and unguided state.*

The original is still very alpha quality and these additions are less than alpha quality, but they do work, and there are a couple working scenarios included in the download as well. It's a pretty good additional aircraft to use with Bombable:

http://brenthugh.com/flightgear/F-15E.zip

All that is based on (and really just a slight tweak of) StuartC's F-15E project here:

http://www.fguk.eu/index.php/forum/deve ... 5e-project

*The trick is to go into the Bombable menu & disable AI aircraft maneuvering . . . makes it a lot easier . . .
flug
 
Posts: 218
Joined: Wed Jun 17, 2009 1:06 am

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

Postby Vodoun da Vinci » Mon Oct 03, 2011 1:43 pm

Thanks again, Flug! :) I just downloaded and installed your hacked F-15E. I screwed it up and thought I'd send a note - We are all used to unpacking aircraft files to FGFS 2.4.0/data/aircraft but you should unpack Flug's hack to FGFS 2.4.0/data like the rest of the Bombable stuff.

It is already in a folder called "aircraft"...just be aware. Or maybe I'm the only one who could screw it up.... :lol:

Flying it - Loving it!

VooDoo
FGFS version 2.4.0 on Windows 7
Primarily Flying Warbirds, Jet and Prop - Visit: http://www.fguk.eu
VooDoo's FGFS/FGUK Movies!: http://www.youtube.com/user/VooDoodaVinci?feature=mhee
"Imagination is more important than knowledge"
A. Einstein
User avatar
Vodoun da Vinci
Retired
 
Posts: 405
Joined: Thu Mar 25, 2010 3:29 pm

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

Postby redneck » Thu Oct 06, 2011 2:32 pm

Hey. I just got this working, and I decided I wanted to recreate the skies over Hanoi event using a Bombable AI scenario. I got the MiGs set up. However, now I have to somehow take out 5 hostile units all by myself without running out of fuel first (probably impossible with it set on very skilled). My plan was to fly the F-4E against them. And then I got a thought. What if teams could be designated? Would it be possible to make some addon or something to Bombable to designate units as friendly and hostile? I think it would be pretty cool. I guess you'd have to somehow make a new property in FG to identify the aircraft, or maybe do something with the transponder. Would be nice if the radar display could be color-coded too, based on IFF readings, but I bet that would be up to the aircraft authors. And now, another thought. What about designating teams over MP? I hope to hear back from you on this.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

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

Postby DutchPilotMitchell » Thu Oct 06, 2011 3:44 pm

Great idea!
Proud to be Dutch.
User avatar
DutchPilotMitchell
 
Posts: 719
Joined: Tue Feb 15, 2011 9:10 pm
Location: The Netherlands
Callsign: mitchel
Version: 22
OS: Mac OS X

CessnaInvasion: FG freezed on 2nd Cessna

Postby Atrus2711 » Sun Oct 09, 2011 3:08 pm

Hi everyone,

I'm trying to solve the first task of the Bombable missions, the "San Francisco Cessna Invasion", using the A6M2 Zero. It works well, and I've managed to shoot up the first... but as soon as I hit the second Cessna (internal number 30), my FG chokes and won't come back to life. Mission not accomplished... :( No messages appear, it just freezes and must be shut down in task manager.

This behaviour was easily reproduced on several attempts.

What can I do?

My config:
  • WIn 7 Pro SP1
  • 8 GB RAM
  • Athlon Phenom 9600 Quadcore @2,3 GHz
  • FG 2.4 installed in c:\FG (to reduce fuzz due to paths with long names or blanks in it)
  • Bombable 4.4

Thx
Martin

PS: Kudos to all the programmers of FG an Bombable! 8)
Atrus2711
 
Posts: 2
Joined: Sun Oct 09, 2011 2:57 pm

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

Postby redneck » Sun Oct 09, 2011 3:32 pm

It may be an issue with your graphics card not being able to cope with all the smoke they generate. Try turning off particles, and see what happens.
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

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

Postby Atrus2711 » Mon Oct 10, 2011 5:31 pm

Hi,

a new graphics driver fixed it.

Thx for your hint :)
Cheers
Martin
Atrus2711
 
Posts: 2
Joined: Sun Oct 09, 2011 2:57 pm

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

Postby redneck » Mon Oct 10, 2011 11:54 pm

Now, I got another question/request. Is there a way to make the enemy AI smarter, aside from setting the skill level all the way up? I've noticed that the enemy planes always use flat turns. I have yet to see them try to stick me in their lift vector by going vertical into any kind of loop or even roll over the top. There was only one occasion I ever took a hit so far, even in scenarios with multiple enemies, and that was when I overshot my target, and wound up right in front of it. I know that's a stupid mistake, but that's not the point. These AI planes fly like airliners on steroids. What I mean by that is: no real basic fighter maneuvers. Just dodge left and right and hope you don't die. Not a very good strategy. Is there any way to make them say determine that they are approaching a merge, and then say dive into it to force me into their lift vector, and then start an Immelman turn in my direction to get a guns solution? I like what you got so far, but I'm really looking for a challenge. I know the real solution is bombable over MP, but if I want to practice first, I want my practice dummies to be a little less dumb :P Is it something I'm doing wrong with the bombable-include file, or does bombable itself have to be modified?
Call Signs: redneck, ATCredn (unspecified freq atc)
FGFSCopilot
FGFSCopilotATCEdition
System Specs
Model: Alienware M15x, OS: Windows 7 Professional 64-bit, RAM: 3 GB, CPU: Intel i3 quad core at 2.4 GHz, GPU: Nvidea GeForce GTX 460M 1.5 GB GDDR5
redneck
 
Posts: 3630
Joined: Mon Feb 02, 2009 2:17 am
Location: Pennsylvania, USA
Version: 240

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

Postby Hooray » Tue Oct 11, 2011 12:34 am

If you know Nasal, you could certainly teach bombable to become a bit smarter, i.e. by adding support for standard combat maneuvers (like you mentioned). In its simplest form you could code a state machine that responds to standard situations with a randomly chosen standard response (and maybe some dynamic variation). It would be a matter of coming up with a state machine implementation in Nasal so that the AI can match up situations against suitable responses. It is definitely possible. I was in fact talking to flug a while ago about adding neural network-based AI to bombable. If there are enough people interested in this aspect of making bombable even smarter, then we could certainly come up with some more challenging AI bots.
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,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11347
Joined: Tue Mar 25, 2008 8:40 am

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

Postby flug » Fri Oct 14, 2011 6:57 pm

Hooray wrote in Tue Oct 11, 2011 12:34 am:If there are enough people interested in this aspect of making bombable even smarter, then we could certainly come up with some more challenging AI bots.


Yes, I like this idea a lot.

One basic problem is that Bombable is basically sitting on top of the FG AI flight system, which is indeed designed to make aircraft fly "like airliners".

But, especially if there is interest to make like a neural net type intelligent/learning system for AI fighter aircraft I think both the Bombable and Flightgear problems could rather easily be solved. The changes that would be required in FlightGear's C code are not that difficult, I believe.
flug
 
Posts: 218
Joined: Wed Jun 17, 2009 1:06 am

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

Postby flug » Fri Oct 14, 2011 6:59 pm

Ver 4.4q devel is now released:

http://brenthugh.com/flightgear/bombable4-4qdevel.zip

* REALISTIC ROLL RATES FOR AI AIRCRAFT: Roll rates are one the most
important factors determining the effectiveness of fighter aircraft--
aircraft that can roll faster can turn faster. Now the roll rate for
AI aircraft in scenarios can be customized, and bugs in the roll & turn
routines for AI aircraft have been fixed.

* SIGNIFICANT PERFORMANCE IMPROVEMENTS: Bombable now makes much less of
an impact on your framerate, and much less stuttering & slowdown at
key points, like when numerous machine gun rounds are impacting.

* RELOCATE ANY SCENARIO TO YOUR LOCATION: Have an AI scenario based
in San Francisco, but want to fly in London? No problem, just hit a
button in the Bombable menu and your scenario comes to you, wherever
you are. Damage levels for AI aircraft and objects are re-set. It's
like loading a new scenario without having to re-start FlightGear.

* RE-SPAWN AI AIRCRAFT & OBJECTS: After you have shot down (or
been shot down by!) AI aircraft or objects in scenarios, you can
instantly re-spawn them and try again. (Available in the Bombable menu.)

The last two are kind of game changers--it's like being able to re-start/re-load a scenario instantly without having to re-start FG.
flug
 
Posts: 218
Joined: Wed Jun 17, 2009 1:06 am

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

Postby flug » Fri Oct 14, 2011 7:10 pm

redneck wrote in Mon Oct 10, 2011 11:54 pm:These AI planes fly like airliners on steroids. What I mean by that is: no real basic fighter maneuvers


There is some improvement in the latest ver of Bombable (4.4q) but real improvement will depend on a solution like Hooray outlines above.

Right now, the Bombable aircraft only do three things:

1. Steer directly towards you if you are within their detection range (and steering towards you means, both in heading and altitude)
2. Wait until they have passed you by a certain distance to steer back towards you
3. Dodge if you shoot close to them or hit them

They also try to avoid crashing into the ground a few other basic things like that.

Considering the very, very basic nature of their behavior programming, they actually engage in some pretty complex behavior.

However it is only (and is only intended to be) a proof of concept--that we can control the AI aircraft within FG, using fairly simple nasal scripting and pretty simple behavior patterns, and make some pretty interesting behavior out of it.

I think if we were to implement an idea like Hooray's we could have some very interesting AI aircraft flying indeed, and it probably wouldn't need to be that hard or complicated.

As I've mentioned in a few other messages, Bombable is always limited by FG's native AI flight system, which is very sedate both as far as turning and (even more so) climbing & diving. It's really designed to model airliners flying sedately from there to there & it will take just a few changes to the underlying C code to make more complex & aggressive maneuvers possible.

The latest version of Bombable does get a little more out of it, though.
flug
 
Posts: 218
Joined: Wed Jun 17, 2009 1:06 am

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

Postby Hooray » Sat Oct 15, 2011 8:42 am

flug wrote in Fri Oct 14, 2011 6:59 pm:The last two are kind of game changers--it's like being able to re-start/re-load a scenario instantly without having to re-start FG.


That's a good thing, indeed my opinion is that most complex Nasal systems should eventually start registering listeners to the major sim "events", such as e.g. /sim/reinit, so that the scripts can deal with such events properly, i.e. for resetting the sim or relocating to a different location.

This applies in particular to registered listeners and timers. I recently added some more comments to your paragraph about cleaning up listeners and timers in the Nasal introduction. You may want to review my remarks.

One basic problem is that Bombable is basically sitting on top of the FG AI flight system, which is indeed designed to make aircraft fly "like airliners". There is some improvement in the latest ver of Bombable (4.4q) but real improvement will depend on a solution like Hooray outlines above.
As I've mentioned in a few other messages, Bombable is always limited by FG's native AI flight system, which is very sedate both as far as turning and (even more so) climbing & diving. It's really designed to model airliners flying sedately from there to there & it will take just a few changes to the underlying C code to make more complex & aggressive maneuvers possible.


A while ago, durk also mentioned being certainly supportive of making his AI system more flexible and controllable, so that it could be better controlled/customized from Nasal space:

viewtopic.php?f=23&t=12849&start=15#p134970
durk wrote:if you have nasal code that would require certain components of the AI system to be shutdown, or need specific hooks to interface certain C++ components with nasal bindings, than I would certainly be willing to support that.



flug wrote:But, especially if there is interest to make like a neural net type intelligent/learning system for AI fighter aircraft I think both the Bombable and Flightgear problems could rather easily be solved. The changes that would be required in FlightGear's C code are not that difficult, I believe.


I guess, it might be a good idea to eventually start collecting a list of things that would need to be changed, i.e. like what Thorsten did for prioritizing core-changes to improve his local weather system using the wiki.
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,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11347
Joined: Tue Mar 25, 2008 8:40 am

PreviousNext

Return to New features

Who is online

Users browsing this forum: No registered users and 0 guests