Page MenuHomeWildfire Games

Ballistics
Needs ReviewPublic

Authored by temple on Sep 6 2017, 8:03 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This patch adds a technology that allows ranged units to aim at moving targets (something they currently do by default). Without the technology now they'll instead aim at where the target is standing, so against moving targets they'll be much less accurate.

I'm actually not convinced this is a good idea, but I thought I should upload the patch anyway and see what others think.

(Currently buildings don't have the Ranged class, so I added that to make it easier to apply the technology. A consequence of this is that "Will to Fight" now applies to those buildings as well, which I think is the correct behavior, since the garrisoned units are adding arrows. But it's easy to fix that if it's unwanted.)

Test Plan

See if you like this behavior or not.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

temple created this revision.Sep 6 2017, 8:03 PM

Like in talking to walls.

elexis added a subscriber: elexis.Sep 7 2017, 12:51 AM

Got a link to a prior discussion?

fatherbushido requested changes to this revision.Oct 23 2017, 3:57 PM

I consider that as not wanted with our attack system.
So I put that at requested changes (but I don't expect changes).
(Even if in the rts of my dreams, the attack system would be different).
The main one which make that irrelevant is that we don't have point attack.

This revision now requires changes to proceed.Oct 23 2017, 3:57 PM
elexis added a comment.Dec 5 2017, 8:01 PM

(I'm not informed to see why it would be bad to have it, even if only for the mod support.)

temple added a comment.Dec 5 2017, 8:18 PM

The point might have been something like it's expensive when units miss their targets since then we have to search for nearby units to see if the projectile hit one of them. Adding this patch would mean that we're missing units a lot more. But he might have meant something else, I don't usually know what's going on inside his head. :)

elexis added a comment.Dec 5 2017, 8:46 PM
In D880#44328, @temple wrote:

Adding this patch would mean that we're missing units a lot more

Well, that's what the tech is designed to do (making the player pay for something instead of granting it from the beginning)
I don't like the argument, but: AoE2 has it too, so supporting it for mods if not having it ingame doesn't sound intrinsically bad.

If we had it in vanilla, what would be the effect on the game? people trying to dodge arrrows more I guess? Would it be bad or allow players to decide between tactics (dodging arrows) and strategy (researching the tech)?

temple added a comment.Dec 5 2017, 9:48 PM
In D880#44331, @elexis wrote:
In D880#44328, @temple wrote:

Adding this patch would mean that we're missing units a lot more

Well, that's what the tech is designed to do (making the player pay for something instead of granting it from the beginning)
I don't like the argument, but: AoE2 has it too, so supporting it for mods if not having it ingame doesn't sound intrinsically bad.
If we had it in vanilla, what would be the effect on the game? people trying to dodge arrrows more I guess? Would it be bad or allow players to decide between tactics (dodging arrows) and strategy (researching the tech)?

The biggest difference would be that you could run away from attacks, e.g. women will be able to run to safety, at least if the ranged units aren't too close. Of course you'd have to test a bit to see the exact effects, and maybe we'd want to adjust the walking speed or projectile speed to get it feeling right. It's actually a bit frustrating being on the attacking side in that situation, so that's why I'm not sure ballistics is a good addition.

With larger armies it might not have a huge effect because any missed shots can still hit other units. I think in AoE2 that's not the case (except for splash damage), so pros end up doing a move-stop-attack-move cycle and can avoid taking damage indefinitely if they time it right. https://www.youtube.com/watch?v=TgU_yaqDsiM

The current system has some problems because it only uses the previous turn for predicting where units will be, so if units dance in place the predictions can be wildly off and that's quite annoying (except when you're the one dancing). And I imagine it'll only get worse if we lower the turn length. Hmm, maybe we could take some kind of average between its current position and its predicted position? Maybe that would lower the effectiveness of dancing a bit.

(We should have an attack ground command for ranged units.)

ffffffff added a subscriber: ffffffff.

makes the game more diversitive

Freagarach added a subscriber: Freagarach.EditedAug 13 2019, 9:50 AM

Could we make it a factor instead? Like if it is 0.5 you've got a 50% chance of correctly estimating the position of a moving object and one can modify that number for different ballistics?
With that factor one can vary either the ETA or estimated velocity (or both)? (Normally distributed perhaps.)
Just throwing in some ideas ;)

This revision now requires review to proceed.Aug 13 2019, 9:50 AM

Proposed different approach:
https://code.wildfiregames.com/differential/diff/10072/
here an entity could have a BallisticsFactor. A factor of 0 means the entity can perfectly estimate the target movement (current behaviour and default). Higher values mean the target's estimated location is less accurately predicted. The exact value of 0.05 can be determined while testing. Also, higher target speeds means the target location is less accurately predicted.