Skip to content

SAM not targeting valid targets due to nuke pathing and sam logic #4745

Description

@JB940

Describe the bug
SAMs have various issues related to targeting. This is a mass-issue to group similar issues

  1. SAMs sometimes fail to shoot nukes inside of the radius close to the edge due to travel speed
  2. SAMs fail to detect MIRV warheads in time due to search radius and warhead speed
  3. Nukes can go through SAM radius if the intersection with the radius passes between ticks
  4. Nuke pathing has a summation error due to pixel rounding, which accumulates and causes a stutter on long range nukes.
  5. SAMs sometimes shoot at nukes unable to hit due to queuing order.
  6. SAMs find nukes by position prioritizing up to down, left to right. If multiple nukes are determined to need immediate firing to intercept, it will prioritize the one furthest north, usually one landing far away.
  • smarter target system, target ones closer to the sam itself first (so it can continue protecting) then target the ones with least time till explosion.
  1. MIRV warheads rain down extremely quickly. High level SAMs fail to target the vast majority despite being in range due to a combination of the above, allow multiple shots per tick.
  2. Keep SAMMissiles alive after a SAM is destroyed. Currently the logic can be abused to prevent the SAM from destroying any nukes due to its own destruction.

To Reproduce
Steps to reproduce the behavior:

  1. Get ingame with another person
  2. build high level SAM stacks and a silo.
  3. throw nukes at each other per issue you want to test. A level 5 sam can be hydro clipped despite red X. mirv warheads destroy the silo. etc.

Expected behavior
For the SAM to be able to target everything in its range properly without exception, and prioritize its own survival. For the missiles it shoots to always hit nukes and not go to waste.

Screenshots
If applicable, add screenshots to help explain your problem.

Image Image Image Image

Desktop (please complete the following information):

Applicable to all

Smartphone (please complete the following information):

Additional context
Add any other context about the problem here.

Assignment

  • I'd like to be assigned to this issue and work on it myself

Metadata

Metadata

Assignees

Labels

approvedApproved for a PR, if you assigned to the issue.

Type

No type

Projects

Status
Triage

Relationships

None yet

Development

No branches or pull requests

Issue actions