Skip to content
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

Turret firing arc #23

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Turret firing arc #23

wants to merge 6 commits into from

Conversation

Elyssaen
Copy link
Owner

Weapons can optionally have the weapon attribute "firing arc" with a
number between 0 and 180, and can swivel that many degrees left or right
of forward. This can allow for swivel cannons (can set up using a gun
mount as normal, and choose a "firing arc" that's fairly low) or for turrets
with a blind spot at the back. By default, anything taking a turret mount
will swivel the full 180, as before.

Missile boat AI will trigger somewhere between 1000 and 2000 range
depending on the swivel angle: as before, fixed guns at 2000 and normal
turrets at 1000, but e.g. a 90° swivel turret will trigger missile boat
AI at 1500 range.

This can also be used on anti-missile weapons. Lastly, if you try to fire
while outside of the firing arc, the gun will try to far as far toward the
target as it can: in practice, this is more playable than not firing at all,
or reverting to fire straight forward.

Context: though this is generally useful, I wrote it for my Trin Mobulas. They're stocky battlecruisers which rely on fixed firepower, and have serious convergence problems if they use normal fixed guns. I wanted to create some swivel cannons for them modelled on Escape Velocity Override's swivel phase cannons (used by Azdaras) and EV Nova's Fusion Pulse Batteries.

Notes: this isn't about limiting the turning rate of a turret, though it's compatible with such a feature. Also, the 'forward' point of any weapon is always forward, so this doesn't allow for broadsides and rear weapons. That'd be a great enhancement, but would require additional AI work. (Note that by 'forward' I mean the ship's facing + the convergence angle.)

@Elyssaen Elyssaen force-pushed the feature/TurretFiringArc branch from d58de82 to f3eb440 Compare May 30, 2017 14:33
@Elyssaen Elyssaen force-pushed the feature/TurretFiringArc branch from 872c452 to ce97f8f Compare June 8, 2017 00:26
@Elyssaen Elyssaen closed this Jun 8, 2017
@Elyssaen Elyssaen force-pushed the feature/TurretFiringArc branch from ce97f8f to 33e1f05 Compare June 8, 2017 01:09
@Elyssaen Elyssaen reopened this Jun 8, 2017
@Elyssaen
Copy link
Owner Author

Elyssaen commented Jun 8, 2017

Reworking this from scratch given the new code changes for finite turret turn speed.

@Elyssaen Elyssaen force-pushed the feature/TurretFiringArc branch from 5fbb644 to e832a0e Compare June 11, 2017 03:40
@Elyssaen Elyssaen force-pushed the feature/TurretFiringArc branch from e832a0e to f8f17df Compare June 14, 2017 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant