PapaJoesSoup / BDArmory

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

Ship / Submarine Combat Features - SLW #201

Open gomker opened 7 years ago

gomker commented 7 years ago
 ...would be a fantastic update. It would certainly make submarine vs surface ship combat much more challenging and would employ the use of the depth charges more.
 I think though, maybe an occasional ping that comes and goes on the radar would be preferable?
 Removing it altogether would make hunting them impossible. But, for instance, you get a ping and can 
 manuever in line with it but it vanishes before you get too close.. you could still guesstimate

 Yeah, that would be more of a comprehensive update to targeting code that would take longer, my 
 thoughts were we may be able to handle this and fake some "sonar"
ghost commented 7 years ago

Maybe then we should also coordinate with NAS if we'd better implement their extensions for torpedoes and depth charges within stock BDAc...?

gomker commented 7 years ago

This is actually started from a conversation where Spanner has already got both of those working - we are in a test thread for SM Parts if you want to join to see what we got so far.

SpannerMonkey commented 7 years ago

@TheDogKSP invited you to test thread so you can see what goes on out of public gaze especially as regards the above.

gomker commented 7 years ago

Noting I found that signal is hardcoded if landed or splashed needs review

    if(vessel.Landed)
        {
            sig *= 0.25f;
        }
        if(vessel.Splashed)
        {
            sig *= 0.4f;
        }
ghost commented 7 years ago

yes, these are modifiers that are applied (see my radar analysis document). In the overhaul I will experiment with leaving those out, to make RCR computation for predictable and consistent.

gomker commented 7 years ago

@TheDogKSP Should we create another issue topic just for the radar refactor? Also I would like to put some of the notes in your analysis in the documentation Wiki as well.

SpannerMonkey commented 7 years ago

A note worth including at this point, despite other peoples approaches there are enough modules in stock KSP and enough configuration options for both ship launched and sub launched torpedoes. Also depth charges can be easily handled in the same way. Combining BDA with stock modules works extremely well. At this point I doubt the need for any extraneous coding in order to alter or control the flight behavior of such devices . video link

ghost commented 7 years ago

@gomker Yes, agreed, feel free to take from the document what you deem suitable!

Acea-K commented 7 years ago

@TheDogKSP Yeah we'll be glad to help, merging torpedoes/depth charges into stock BDAc would save us a lot of time, due to the fact that we really don't have enough programmers (I am only a project manager of our team, monitoring the whole project and communicating with the community), also we'd be happy if modern-style anti-submarine weapons could get a place among BDAc weapon systems. The plugin we're using now is unguided only and have an UI which helps with setting depths of all these weapons, hopefully it would help with this project. More details in issue #223 https://github.com/Summerfirefly/ASW

Cheers, Forum user Acea, on behalf of Kerwis Team, creator of NAS

ghost commented 7 years ago

Hi acea,

Indeed we are currently working on bringing torpedoes and depth charges into BDAcontinued, and in case of torpedoes with full guidance (active sonar) possibilities. @gomker is our main developer driving this feature, together with @spannermonkey. I guess we'll have to see if this really supercedes your custom plugin, or if maybe you have some additional functionality not yet covered by us...

Acea-K commented 7 years ago

@TheDogKSP Sure we actually have some additional features. Our plugin includes a realistic buoyancy simulation, random depth error, fixed depth cruising (for unguided torpedoes), torpedo/depth charge attitude control, and a UI for tweaking anti-submarine weapon parameters (guidance hasn't been taken into consideration yet, since we're only making WWII weapons). I'm not sure which would be needed but that's all designed for realistic simulation, as far as we see, these features work quite nice so far. Maybe you could check our codes and see if they are valuable enough?

ghost commented 7 years ago

Well, unguided is already possible with our system, a torpedo does not have to be configured with an active guidance type. Maybe gomker and me can provide you with an example config for one of your torpedoes and depth charges and you can have a try if that already works for you, or not.

Acea-K commented 7 years ago

@TheDogKSP I've done a quick test and it, sorry to say that but, doesn't seem to work well. NAS torpedo with our plugin could keep itself in a stable, relatively horizontal attitude, and cruise at a fixed depth which could be set with right click menu, while the new torpedo type (unguided) just simply sinks when buoyancy set to lower than 1, or bounce/float on the surface when near 1. I don't mean to say that you guys didn't do a nice job, but that's still space to improve. Here're the test screenshots when I set the buoyancy parameter low. http://imgur.com/a/C8MsN

XOC2008 commented 7 years ago

I'm not a programmer or anything, just testing things for the gentlemen at BDAc and for SM stuff. Did you just take a NAS torpedo and add the BDAc torpedo code or did you actually rework the torpedo at all? The BAE Spearfish in SMM has a 0.1 buoyancy and weighs 1.2, and while unguided, shoots pretty straight until the slow descent due to zero target. (Like many missiles firing off into nothingness.) Seems to me your torpedo is horribly front heavy and needs to be balanced out correctly with proper aero(hydro) when applying a different system to it.

ghost commented 7 years ago

@Acea-K well, not saying that our system automatically works great for your weapons... in addition, as XOC2008 pointed out, you use real-world sizes while our stuff has kerbal sizes and values.

Just for a test I took your US Mk15 torpedo (NAS_TO_Mark15_USN) and edited it as follows: buoyancy = 0.9 missileType = torpedo (in the MissileLauncher partmodule)

I just fired it successfully from the torpedo tube of a Dallas class sub (well, due it's size it didnt really fit in, but fired anyway). The torpedo is quite heavy, and for it's weight has very little thrust, but it stayed well in the water without sinking like a rock or floating to the surface.

I guess it is necessary to play around with the values a lot (fine-tuning), I believe SPannerMonkey on our side spent hours and hours of his time on that, too...

ghost commented 7 years ago

ok, forget my last comment, it still sinks, just not as fast...

Acea-K commented 7 years ago

@XOC2008 @TheDogKSP Yeah I understand, we have a period of time when there was no such plugin and we only used stock buoyancy system. They have once been balanced in weight center and thrust too. It could work, I must admit as you pointed out, by carefully tuning all the parameters (from which our thrust data came from), at least it worked for us for several months, but that's neither anything realistic enough (like most real WWII torpedoes, which doesn't have any kind of guidance at all and could cruise in a straight line for miles), nor would it behave really well, that's why we finally decided to make a plugin. I believe that as far as we do have an amazing weapon called plugin, why wouldn't we make the maximum usage out of it? Modern torpedoes are great, but there's something else, maybe a bit out of date, which needs consideration too. I believe that a more realistic working mode is something you're willing to achieve too.

XOC2008 commented 7 years ago

I'm glad you think your plugin is great, but it doesn't really suit the torpedo system that gomker and Spannermonkey have worked out, which takes into account weapon hydrodynamics, terminal guidance, buoyancy, and weight balance. I think shoehorning your plugin into all their hard work would be counterproductive.

Acea-K commented 7 years ago

Umm maybe you're right, I guess I'll keep my own way. Adding something complete strange into a plugin that has been developed for a long time may not be the best idea. Anyway the hydrodynamics simulation looks nice, and I'd try a different way to make it up to maximum usage. Thank you guys and I hope that our codes can be at least a reference.

XOC2008 commented 7 years ago

I think it's fair to say, much like NKD has it's own explosion plugin for nukes, that NAS can use its plugin to maximum effect with NAS torpedoes and depth charges, (And should probably at least adapt some of the new BDAc code so that they can be detected by other vessels accordingly), as long as it doesn't try and supersede the base plugins of BDAc, and of course the new BDAc code wouldn't prevent the plugin from doing its job on NAS weapons.

Acea-K commented 7 years ago

Yeah I agree, the new engagement methods are awesome. we'll gladly accept that, which would make AI naval battles much more exciting. By the way I want to ask one more question, would you add aiming marks to torpedo type? It's really annoying when you're trying to align up a torpedo attacker to a target, without something like an aiming circle or line.

gomker commented 7 years ago

Currently the Aim circle is dictated by the homing type (heat,radar,bomb...) . As we implement the rest of the features in phases there will be a "SLW" targeting modes which we could customize.

There is also work being done by JR to make BDA more accessible and extensible for mods there may be a solution as we move forward with that work as well.