Loading...
  OR  Zero-K Name:    Password:   

Lookahead

12 posts, 541 views
Post comment
Filter:    Player:  
sort
I just learned that Kodachi has Lookahead stat among some other units, like Ripper and Reaver.
I didn't even knew this was a thing. It makes units preaim at the enemy before they enter range of the target.
It can be a pretty big buff to a lot of units.

Why shouldn't all units have it?
If Kodachi, which is a raider, has it, I think at least all raiders should get it.

Edit:
Relevant git: https://github.com/ZeroK-RTS/Zero-K/pull/3912
+11 / -0

8 months ago
I think what SErankGodde says is logical.
All units must have the same opportunities
+0 / -0
8 months ago
It doesn't make sense on many units, especially ones with long cooldowns. You could just bait them into wasting their shots without going into range.
+0 / -0
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:
  • It must be aiming at a target (it can aim beyond range with lookahead).
  • It must fire at a position within range (fire position = targetPosition + targetVelocity*distToTarget/projectileSpeed).

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.

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. SErankGodde 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.

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.

Commit: https://github.com/ZeroK-RTS/Zero-K/commit/bc2d4f44f4a1dd0bf724a40ecb237f181dc0c2ab?w=1

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.

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.
+7 / -0
Idk why Godde didn't mention it directly, but the cause was a game of dagger vs kodachi. I'm not sure dagger aim time is a particularly interesting mechanic, since it's impossible to see its turret anyway. Would it lead to excessive misses?
+2 / -0


8 months ago
Yeah, the prefire/lookahead leads to situations like this where the Kodachi fires before the Dagger even when chasing:
And these 2 units have the same range.
+4 / -0


8 months ago
Actually it seems like units won't even aim unless they can get a lead on the target.
+4 / -0


8 months ago
Lookahead makes a huge change for unit behavior, balance and micromanagement in Zero-K.
It makes the units so much smarter.
Arguably it also opens up design space so that units that right now have almost instant turret turn rate, could have their turret turn rate reduced drastically without actually reducing their effectiveness that much.
I think lookahead is in the spirit of Zero-K as it makes unit targeting smarter and allows the units to be more mechanically and physically diverse, and that pretty much all units should have lookahead.
+4 / -0


8 months ago
How does unit prioritization work in the scenario that there are two units to turn to?
+1 / -0

8 months ago
so does this affect kodachi-scorcher?
do we have to redo our test-games now?
+0 / -0
8 months ago
This shouldn't meaningfully impact scorcher vs kodachi, since scorcher does so little damage at long range anyway.
+0 / -0


8 months ago
Lookahead is live because there were some other urgent fixes. See http://zero-k.info/Forum/Post/227817#227817
+0 / -0