1 |
Lookahead does not merely make units aim before their target enters range. It can also let units predicatively fire at units if they would enter range by the time the projectile hits. This happens because a weapon needs to satisfy two conditions to fire:
|
1 |
Lookahead does not merely make units aim before their target enters range. It can also let units predicatively fire at units if they would enter range by the time the projectile hits. This happens because a weapon needs to satisfy two conditions to fire:
|
2 |
* It must be aiming at a target (it can aim beyond range with lookahead).
|
2 |
* It must be aiming at a target (it can aim beyond range with lookahead).
|
3 |
* It must fire at a position within range (fire position = targetPosition + targetVelocity*distToTarget/projectileSpeed).
|
3 |
* It must fire at a position within range (fire position = targetPosition + targetVelocity*distToTarget/projectileSpeed).
|
4 |
\n
|
4 |
\n
|
5 |
The main purpose of lookahead was to render the prefire widget obsolete, since the widget could not be included as it suffered from the usual issues of unit AI widgets. The ZK-cyborgs can stand the latency and command-overriding, riding the jank is a part of crafting your own deck, but a piece of the default UI it would not work. See https://zero-k.info/Forum/Post/219329#219329 etc.
|
5 |
The main purpose of lookahead was to render the prefire widget obsolete, since the widget could not be included as it suffered from the usual issues of unit AI widgets. The ZK-cyborgs can stand the latency and command-overriding, riding the jank is a part of crafting your own deck, but a piece of the default UI it would not work. See https://zero-k.info/Forum/Post/219329#219329 etc.
|
6 |
\n
|
6 |
\n
|
7 |
Now that lookahead seems to be working on a technical level it could be added to other units. On one hand this seems like the kind of thing a widget could do eventually, but on the other hand lookahead sort of removes aim time on raiders as a mechanic. @Godde do you actually want to remove aim time or are you just angry at a particular situation? Anyway, it feels like the kind of change that would happen eventually, so I'll try it out.
|
7 |
Now that lookahead seems to be working on a technical level it could be added to other units. On one hand this seems like the kind of thing a widget could do eventually, but on the other hand lookahead sort of removes aim time on raiders as a mechanic. @Godde do you actually want to remove aim time or are you just angry at a particular situation? Anyway, it feels like the kind of change that would happen eventually, so I'll try it out.
|
8 |
\n
|
8 |
\n
|
9 |
I added lookahead to most raiders and some riots. Obviously Cutter or Outlaw don't need it because they don't aim. I am wary of adding it to inaccurate units with noticeable reload times as shots at such range are likely to miss. You should go test it because I expect it to mess with a lot of raider matchups.
|
9 |
I added lookahead to most raiders and some riots. Obviously Cutter or Outlaw don't need it because they don't aim. I am wary of adding it to inaccurate units with noticeable reload times as shots at such range are likely to miss. You should go test it because I expect it to mess with a lot of raider matchups.
|
10 |
\n
|
10 |
\n
|
11 |
Commit: https://github.com/ZeroK-RTS/Zero-K/commit/bc2d4f44f4a1dd0bf724a40ecb237f181dc0c2ab?w=1
|
11 |
Commit: https://github.com/ZeroK-RTS/Zero-K/commit/bc2d4f44f4a1dd0bf724a40ecb237f181dc0c2ab?w=1
|
12 |
\n
|
12 |
\n
|
13 |
Note that Glaive, Bandit, Dagger, Scorcher and Pyro won't gain any significant range because they have near-zero leadLimit. The target position equation I posted above is incomplete because an optimal parameter, leadLimit, can be used to bound the magnitude of the lead vector. Low leadLimit is how the five raiders I listed are able to fire at fleeing units near their max range, ie how they remove the "retreat bonus". The projectiles are reaimed upon creation to replicate correct leading and the tolerances in the physics make it all work out.
|
13 |
Note that Glaive, Bandit, Dagger, Scorcher and Pyro won't gain any significant range because they have near-zero leadLimit. The target position equation I posted above is incomplete because an optimal parameter, leadLimit, can be used to bound the magnitude of the lead vector. Low leadLimit is how the five raiders I listed are able to fire at fleeing units near their max range, ie how they remove the "retreat bonus". The projectiles are reaimed upon creation to replicate correct leading and the tolerances in the physics make it all work out.
|
14 |
\n
|
14 |
\n
|
15 |
Obviously
Flea,
Dart,
Bolas
and
Blitz
won't
"gain"
any
range
either
simply
because
instant
beam
weapons
don't
need
to
lead.
|
15 |
Obviously
Flea,
Dart,
Bolas
and
Blitz
won't
"gain"
any
range
either
simply
because
instant
beam
weapons
don't
need
to
lead.
Duck
and
Cutter
won't
"gain"
range
either
because
homing
missiles
don't
lead.
|