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

Torpedos: Make torpedos find new targets #624

Open
alexanderson1993 opened this issue May 11, 2024 · 0 comments
Open

Torpedos: Make torpedos find new targets #624

alexanderson1993 opened this issue May 11, 2024 · 0 comments
Labels
Feature Help Wanted Items that are good for folks that are new to the project.

Comments

@alexanderson1993
Copy link
Member

Torpedos are designed to have a specific guidance range, supplied by their guidance module. This dictates how close a torpedo needs to be to maintain a target lock. If the target moves outside of that range, the target should be lost.

This behavior hasn't been implemented yet. Currently, the torpedo maintains the target lock regardless of distance.

So, we need to do two things:

  1. Make it so the torpedo loses its target lock when its distance to its target is greater than the guidance range.
  2. Make the torpedo pick a new target, based on its guidance mode.

It will pick a target within its guidance range based on which guidance mode its using

  • Visible guidance mode: Pick the closest target that is visible. So cloaked or stealthy ships won't be targeted.
  • Infrared guidance mode: Pick the hottest target (we'll have to create a function for figuring out the overall heat of a ship based on the heat of its systems)
  • Gravimetric guidance mode: Pick the most massive target.

This can all be done in the TorpedoMovementSystem or in a new system just for this purpose. Though it doesn't hurt to do it in the TorpedoMovementSystem.

@alexanderson1993 alexanderson1993 added Feature Help Wanted Items that are good for folks that are new to the project. labels May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Help Wanted Items that are good for folks that are new to the project.
Projects
None yet
Development

No branches or pull requests

1 participant