PapaJoesSoup / BDArmory

Gun turrets and other weapon systems for KSP
114 stars 57 forks source link

Vessel Targeting - COM / Weapon Manager #22

Open SpannerMonkey opened 8 years ago

SpannerMonkey commented 8 years ago

Vessel Targeting , focus needs to switch from COM target only. Large modular targets with many vulnerable areas are having these spaces and fitted equipment rendered, for want of a better word ornamental, all they do is carry the COM into battle then stand by while it dies, No section other than that immediately attached to the COM takes more than minor damage or offers protection to the COM area, except in direct frontal attacks, which on large vessels is very unlikely.

//////Original edited intro ////////////////////////////////////////////////////////////////////////// At present the AI controlled weapons fire only at the opponents weapon manager module position. This means that once the WM is destroyed the AI ceases firing, and in recent experiments at 4km range have shown little collateral damage to surrounding parts. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// Would it be possible for the AI to create a list of weapons on the opponent once identified as a target? and by referring to that list continue to fire upon any weapon installed on a confirmed target. OR perhaps create a part module with the only purpose to identify the part as a valid target, although i believe the code already identifies turrets and fixed weapon installations, and obviously the location of the opponents WM module, so perhaps it's just a matter of recording that info as belonging to the target rather than a generic weapon pool

TheDestroyer111 commented 8 years ago

No. If an enemy was going to be identified by its weaponry, then if your and your enemy's fighters have the same armament, a lot of friendly fire is going to happen. No. The same reason as above No. Currently the only legitimate target for BDA guard mode is the root part of a vessel containing a weapon manager. BTW this is weird, AFAIK even the BDA AI isn't enough accurate to snipe off a Weapon Manager from 4 kilometers (think logically: the weapon manager is much smaller than a human, and the longest distance a human was ever sniped from is 2.5 kilometers. and there are very little other cases of people getting sniped from more than 1 km) Also, with the last of your ideas, I may be wrong, but something makes me think that it would require the ModuleManager mod to work, and there must be a reason why BahamutoD didn't use it.

SpannerMonkey commented 8 years ago

AI to create a list of weapons on the opponent once identified as a target?

Primarily the enemy would as now be identified by being set as TeamB in the appropriate weapon manager and then be ID'd as such by TeamA's Ai Then and only then would any attached weapons be associated to that enemy. It would not require module manager or any other component and the information already exists So no friendly fire As for accuracy its more than accurate enough to destroy one part of a ship containing a WM and leave the rest of the vessel intact aside from a bit of heat damage. No. Currently the only legitimate target for BDA guard mode is the root part of a vessel containing a weapon manager. And that statement is simply wrong

PapaJoesSoup commented 8 years ago

Sounds like a bit of apples and oranges here. I've not looked deeply at this code yet, but it is possible to target a particular part.

Given that, it is also possible to target a particular vessel. Finally, with the heat model its possible to target the hottest part. So heat seeking should be targeting hot parts.

Now I'm thinking that if BDA ai is targeting the part (s) with a Wm module, that is bad. Are we talking radar guided? If so, then I think it is center of mass that should be the target.

Thoughts? Or did I miss the point of the enhancement request?

SpannerMonkey commented 8 years ago

Nope it is not a missile issue it's turret related, radar guided, does head for radar, gps goes where it's told to, heat seekers, seek the hottest part although it's a bit tricky to tell exactly. Turret AI can be tested by setting up a long vesse, and setting widely spaced turrets along it's length, arranging a suitable target with a WM in a visible location and selecting the WM to opposing team . You will see that the aim points are exactly aligned, and shell fall that deviates from this point is accountable due to deviation. The AI stops seeing a target the second the WM is destroyed. I test this probably 100 times a day at present, trying to balance LBP parts against BD weapon effects Also the same behavior is demonstrated by the AI when piloting aircraft

PapaJoesSoup commented 8 years ago

Ok, so IRL, turret targeting is typically one of 2 methods.. optical or radar. with that said. either of these methods should likely target center of mass.. would you agree? and not the WM module part itself..

TheDestroyer111 commented 8 years ago

Optical would target some random non-transparent part of the vessel (usually closer to the visible center of the vessel), and radar would target the most radar-visible area (propellers, jet engines that aren't covered by s-duct or DSIntake, certain internal structures, tailfins, armament etc.). Doing any of these well would be complex and won't be done without BDArmory 2. (so it won't be done at all) Right now the best would be targeting the hottest part for heatseekers, or one of these parts for others: Center of mass, root part, command module, or weapon manager part.

SpannerMonkey commented 8 years ago

I'll settle for center of mass over the module. center of mass destruction would be the end of 90% of the vessels/craft, the other ten percent are edge case and not worth worrying about.

Do note that I'm not on some realism kick, I don't care much for realism over gameplay. i just feel the the current method is inadequate at best and does not guarantee target destruction and with the ever increasing capacity of KSP and ships getting bigger it will become more and more noticeable

PapaJoesSoup commented 8 years ago

Agreed

TheDestroyer111 commented 8 years ago

After some tests, I noticed that both AMRAAM and Sidewinder missiles go towards the center of mass (at least for an aircraft carrier which doesn't emit much heat, it is hard to see where exactly the missiles go for smaller crafts which emit heat on some parts).

Feni85 commented 8 years ago

I'm pretty sure that BDA already targets CoM with both cannons and missiles.. If I remember correctly this feature has been added at least half a year ago by BahamutoD.

PapaJoesSoup commented 8 years ago

Feni85, thanks for that info. I'll research it as well.

TheDestroyer111 commented 8 years ago

Radar and heat-seeking missiles indeed target CoM, but guns target the root part (my aircraft carrier has its root part on the very back of it). At least when in standard mode, Idk about turrets slaved to radar.

SpannerMonkey commented 8 years ago

Radar and heat-seeking missiles indeed target CoM, but guns target the root part (my aircraft carrier has its root part on the very back of it). At least when in standard mode, Idk about turrets slaved to radar.

Hi I've done a lot more testing and can confirm that the above is true, and my first impression that the WM was the target was incorrect, the gun target is indeed the root part of the opposing vessel. It was purely coincidental that i have a habit of placing the WM module low down towards the center of any vessel.

TheDestroyer111 commented 8 years ago

So... what should be changed if the target for weapons is CoM/root part? Or should this issue be closed actually?

TheDestroyer111 commented 8 years ago

@PapaJoesSoup @jrodrigv Are you there?

PapaJoesSoup commented 8 years ago

Yes we,are. We are working shader issue right now. We will return to this when When we have a working 1.2 version with squad's official version.

gomker commented 7 years ago

@SpannerMonkey is this still relevant considering our recent updates to targeting code?

SpannerMonkey commented 7 years ago

@gomker Even though I have some dispute with the com method, it is a workable and practical solution.
I'd like to see some better method for dealing with large well armed craft Com works well for smaller craft but is less impressive on larger ones.

But as the current system works for most players and cases, leaving it as it is does have value

SpannerMonkey commented 6 years ago

Hi , I'm going to re stir some interest in this as with the latest Damage Armor and bullet overhaul, the effect is even more noticeable . Check video posted BDA slack general. on tanks and aircraft/small vehicles the problem is not so apparent, however when you get ship sized 50 plus meters it can clearly be seen that every shell lands within a few meters of the preceding one, what this does is render the rst of the ship useless as protection for any part , as they are ignored over the COM , and the com will always be low and central . So the results will always be the same , center hull failure followed by sinking of an otherwise fine ship

jrodrigv commented 6 years ago

I think this should have an easy fix. Possible solutions:

SpannerMonkey commented 6 years ago

In order of preference, and in the interests of greater battle time/ immersion

Target weapons first,

Perhaps and seems logical to try and knock out the big guns, though really it's command an control you need to kill.

Target random parts of the vessel instead of the COM,

Not so much random but the main command pod and areas containing other modules (perhaps this last is too much of a request) Or command pod, Com and WM ?

Considering the above, the final possibility

Target the COM but adding a pseudo random dispersion so the final target is vessel.COM + dispersionVector.

That looks like it would give the appearance of less focused shot fall, more widespread damage, and the really important bit if this is going to work on truly modular ships is a much greater chance of critical component damage leading to ship loss . I do like this as what seems, to a part guy, like a possibly easier thing to test than the other options

One totally off the wall thought, can the ray cast roughly measure a target? If it could , measure target vessel every few radar scans , and ensure that every shell lands some where in that space ( just like a real fire director)

Thanks for having a think on it, much appreciated.

Azimech commented 6 years ago

I'd like to think of other scenario's as well than just destroying a ship. Suppose there's a fast ship trying to escape heavy firepower of slower ships. In that case, disabling the propellers or rudder(s) would change the game. #Bismarck. It would also create the possibility to capture a ship (in a hypothetical future multi-player environment). So identifying and locking on specific parts would be key.

jrodrigv commented 6 years ago

@SpannerMonkey @Azimech Hi all, is this issue stil relevant? I think Gedas has done some implementations for distribution of bullets.

SpannerMonkey commented 6 years ago

Although its less obvious on normal sized targets. It still looks wrong when dealing with larger, ship sized targets , with most shell strikes within a couple of meters of the COM, leaving the rest of the vessel mostly unharmed . The problem is still such that the latest batch of hulls despite being over 100mtrs long are not multipart , in order to allow damage to the whole hull instead of a particular section. Azimechs points are especially valid with the advent of ship AI more now than ever before . Though modular internals , rather than dumb parts (huge parts with lots of modules all in one cfg) in combination with the damage system does mean that ship disablement, rather than sinking or destruction , is more prevalent than in former editions of BDA

Gedas-S commented 6 years ago

I agree that the idea of AI sometimes targeting critical components instead of CoM would be cool, and reasonable, and improve gameplay. But for the AI to make that decision reasonably well, it will take quite a bit of work, and probably needs some better AI targeting infrastructure, so eventually.

Otherwise, if a gun is accurate enough to saw a ship in half at 15km, I don't see why any operator would not. If it seems like all the shots fall unrealistically on the CoM, it's indicative of the maxDeviation of a gun being too small. The bullet spread changes @jrodrigv is talking about should stop making larger maxDeviation looking so bad.

Link to changes - https://github.com/PapaJoesSoup/BDArmory/pull/488/commits/f3cd67c048574acc13135b919489c87e9341f604