-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limited turret arc #18
Limited turret arc #18
Conversation
…lculate and to clone.
- Introduce an attribute "angle of traverse" for a hardpoint. - Change a type of parameter in the constructor of class "Hardpoint." - GetAngleOfTraverse() returns some valid value in case this is Omnidirectional or a gun port. - Rewrite some comments.
…cted hardpoint and weapon. The previous commit introduced the bug.
…x some style issues.
Updating fork
Co-authored-by: tehhowch <[email protected]>
…ad of in-flight. And the turrets calculate the idle position considering the "parallel" parameter.
…3/endless-sky into oo13-limited_turret_turning_angle
Use `IsInRange` instead of comparing degrees. Co-authored-by: oo13 <[email protected]>
Construct Angle with double to avoid using private function.
Co-authored-by: Rising Leaf <[email protected]>
Conflicts |
Co-authored-by: Rising Leaf <[email protected]>
…ess-sky into limited-turret-arc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I don't feel that I understand the code well enough to approve it; on a conceptual level I definitely like it, and trust RisingLeaf to understand the code better than I do. :)
Thoughts:
- Being able to have limited-arc turrets allows a measure of "half benefit" or "lower value" hardpoints. Ex. Having a freighter that has a turret with a limited arc to the rear. Good for fending off an ambush or covering its retreat, but not good for offense. Militarily speaking, this makes this turret hard point "worth less" than an unrestricted turret.
- Control: Especially for agile ships, having turrets swinging around all over can be detrimental, especially with slow turrets, as the turrets don't know what you are planning to do. Having them restricted to specific ranges means they can't wander as far off target and reduce the "regain target" time, at the cost of putting more of the aiming onus on the pilot.
Question:
- Can these restricted ranges be put on the outfit too? I think I saw that mentioned somewhere, but confirmation would be nice.
Yes, I forgot to mention it on the summary. Will update. |
Feature: This PR implements the feature request detailed and discussed in issue endless-sky#3148
Just endless-sky#7094 but PRed to ES-Delta
Feature Details
Allow limiting the angle that turrets can aim and fire both from ship's hardpoint and the weapon itself. Will use the most limiting of the two if both exist. Unlike the previous PR, the arc is relative to baseAngle/idleAngle as I think it is more intuitive and easier to visualize. Now first arc value have to be less than second arc value.
This PR also allows turrets to restrict their own angle, if both the outfit and the hardpoint have limit it will pick the most restrictive of the two.
PRing this to Delta fork experimental branch because I think it's can greatly affect combat gameplay especially when used along side other potential balance changes like large difference in speed between large and small ships as well as new fighter AI in #17 .
Currently this PR does not introduce any data change so all ship still have their default 360 turret.
Usage Examples
Syntax:
Example use:
UI Screenshots
Image
img
Testing Done
Tested various arc and flying around.
Automated Tests Added
None yet.
Performance Impact
From previous PR (endless-sky#5459):