#97c: waves attack buildings #101

Closed
opened 2026-08-23 11:18:43 +00:00 by metaheavens · 1 comment
Owner

Subticket of #97, depends on #97a and #97b.

"Waves tries to attack built buildings."

Today every enemy component hunts player_ships and nothing else, so a
structure is scenery to them. Wave enemies need to pick a target that can be a
BUILDING, close on it, and damage it - while still fighting the fleet when the
fleet is what is in front of them.

Subticket of #97, depends on #97a and #97b. "Waves tries to attack built buildings." Today every enemy component hunts `player_ships` and nothing else, so a structure is scenery to them. Wave enemies need to pick a target that can be a BUILDING, close on it, and damage it - while still fighting the fleet when the fleet is what is in front of them.
Author
Owner

Done in 3debcd7.

EnemyTargets answers "who am I coming for" once, for pursuit, standoff, the
lancer's lunge and the ranged weapon together. One thumb on the scale: a vessel
inside 520px always wins even against a nearer building, or the fleet could not
defend anything by interposing itself.

Buildings got a hitbox - an Area2D in a group, the same shape as a Ship or an
asteroid, so the projectile needed one extra branch rather than a new concept.
Damage lands on a tick rather than on entry: entry fires once, which is right
for a rammer that dies on the first strike, but would let a sniper that drifted
inside sit there scratch-free for ever.

What one strike costs is data on the enemy definition, for the same reason
dies_on_contact is - a lancer arriving at 950px/s is not a sniper drifting
into a wall.

Done in 3debcd7. `EnemyTargets` answers "who am I coming for" once, for pursuit, standoff, the lancer's lunge and the ranged weapon together. One thumb on the scale: a vessel inside 520px always wins even against a nearer building, or the fleet could not defend anything by interposing itself. Buildings got a hitbox - an Area2D in a group, the same shape as a Ship or an asteroid, so the projectile needed one extra branch rather than a new concept. Damage lands on a tick rather than on entry: entry fires once, which is right for a rammer that dies on the first strike, but would let a sniper that drifted inside sit there scratch-free for ever. What one strike costs is data on the enemy definition, for the same reason `dies_on_contact` is - a lancer arriving at 950px/s is not a sniper drifting into a wall.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#101
No description provided.