Talk:Scripted AI Objects

From FlightGear wiki
Revision as of 13:17, 28 October 2014 by Red Leader (talk | contribs) (Add stuff)
Jump to navigation Jump to search

As Hooray said, this is the talk started here : http://wiki.flightgear.org/User_talk:Red_Leader We agree on the general way of doing it, and the goal we want.

For now, the script use 2 objects :

1) the missile itself
2) A "target" object which is an object with all variable available on the target aircraft/ship whatever...

The aircraft very specific variables are those used to setup the inital position of the missile : You give a pylon number and the script go look threw your aircraft to geo positionning the missile object and make it fire.( and the missile type...)

Instead of using this :

var DestinationOfFiring = new target(whatever);
missile = new missile(pylon, DestinationOfFiring ); 

a very, very simple way of doing it could be just feed the missile with 2 object and have someting like that

var SourceOfFiring = new target(whatever);
var DestinationOfFiring = new target(whatever);
var myMissile = new missile(SourceOfFiring , DestinationOfFiring, missileType);

This is a quick way of doing the job. Perhaps the "Target" object needs to be completed, with "pylon number" or "pylon position" (and it also could be renamed). This will allow the script to be independant of any aircraft. This is not only a quick way of doing it, this also something that can allow multiplayer firing : If (imagine a checkbox) the "MP firing property" is activated, it could reproduce a "AI model" on both side : On the SourceOfFiring's computer, but also a second "AI model" in the DestinationOfFiring's computer...(this a way of doing it...)

And then once this is done, we could work later on a real FDM for the missile and what so ever. (Anyways, just my 2 cents opinion...) —5H1N0B1 (Talk | contribs) 14:08, 27 October 2014 (UTC)

Hi 5H1N0B1. Sorry I've not been able to get back to you sooner. Your suggestion seems quite good. Also, having MP firing would be a great feature. One thing we need to consider is how we coordinate code, i.e. use of version control etc.. I think that we should also write down stuff that would be configurable on the missile (i.e. size and weight, but also seeker and guidance type). A while ago, I found a PDF that I think will be very useful http://cdn.preterhuman.net/texts/terrorism_and_pyrotechnics/rocketry/Missiles_and_Warheads/Missile%20Guidance%20&%20Control%20Systems.pdf.
Red Leader (Talk | contribs) 12:59, 28 October 2014 (UTC)