Page MenuHomeWildfire Games

Ballistics.
Needs ReviewPublic

Authored by Freagarach on Sep 6 2017, 8:03 PM.

Details

Reviewers
temple
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

This patch adds a factor that units can be given to aim less accurately on moving targets.
Ideally this would be on a [0, 1] scale I think, where 1 == perfect estimation?

Test Plan

See if you like this behavior or not.
Test that with a higher value a moving target is hit less often and that normal behaviour is maintained with no changes made to templates.

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.

Freagarach updated this revision to Diff 10072.Mar 28 2020, 5:28 PM
Freagarach retitled this revision from Ballistics to Ballistics..
Freagarach edited the summary of this revision. (Show Details)
Freagarach edited the test plan for this revision. (Show Details)
Freagarach added a reviewer: Restricted Owners Package.
Freagarach set the repository for this revision to rP 0 A.D. Public Repository.

Different approach.

Freagarach commandeered this revision.Mar 28 2020, 5:28 PM
Freagarach added a reviewer: temple.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1943/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1419/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/515/display/redirect

Angen added a subscriber: Angen.Apr 26 2020, 3:09 PM

is this not the same like spread ?
in which way of result it is different ?

This is different from spread in that this only affects moving targets. So the spread would be only in the line of motion of the target. (And of course the usual spread.)

badosu added a subscriber: badosu.EditedApr 29 2020, 11:44 PM

I like the idea of ballistics inclusion, one issue I find often is that chasing units with ranged units (e.g. skirm cav against archer cav) is very inefficient while it shouldn't in terms of gameplay.

In AoE:DE the default is to have low accuracy and no ballistics, accuracy and ballistics techs exist and they are decoupled from each other, there's a very interesting video detailing this on https://www.youtube.com/watch?v=mgvSMtsAyAc (skip to 5:00 to see in action)

In summary:

  • Perfect accuracy ensures that after the shot is fired, the intended position is hit on point regardless if the unit targeted is present on the location
  • Ballistics calculates the speed of the targeted unit in a direction and sets the targeted position based on that, if the unit changes direction it still can escape
  • Accuracy and ballistics are decoupled from each other: a shot with perfect accuracy and no ballistics will fail a moving target, a shot with ballistics and low accuracy can have the correct target location but fail the shot

Moreover, both perfect accuracy and ballistics are separate technologies on AoE:DE, it would sure be interesting to have such a thing on 0AD but I wouldn't worry about that for now.

Having default ballistics would be interesting but I would suggest playtesting to ensure it does not increase the usage gap between melee and ranged units more than what we have now.

Thanks for the excellent explanation @badosu!
One thing to notice though, is that as the game currently stands, units can perfectly estimate the position of their target, i.e. perfect "ballistics". This patch introduces an option to change that behaviour from the templates.
This would allow that e.g. ranged units are very bad at estimating the path of a moving target early in the game, but one can research a technology to improve that.

A good thing to notice would be indeed that hunting is also affected by this.

Yes there is perfect ballistics by default in the game.
One thing to note is that perfect ballistics allow for easier dancing (in fact, both in 0 A.D. and in AoE2) but not sure if that should be taken into account for decision making.

I think dancing ought to be solved differently*, or one is just replacing one evil with another.

(* Unit acceleration/deceleration.)

Yes, that's why i showed reserve if this fact should be taken into account.

badosu added a comment.EditedApr 30 2020, 11:15 AM

One thing to notice though, is that as the game currently stands, units can perfectly estimate the position of their target, i.e. perfect "ballistics". This patch introduces an option to change that behaviour from the templates.

Perfect ballistics is not an issue in my opinion, given the current spread is quite considerable. It would require checking how it affects different ranged units and adjusting so none are overpowered.

Having none or perfect ballistics (researcheable) would be easier to test and balance, having a ballistics ratio may be feasible though a little harder to understand for players and fine tune.

Inclusion of ballistics possibly aggravates dancing due to mistarget on sharp turns. That said, it possibly improves more important aspects of gameplay (chasing mechanics, technology options, etc).

Lots of 'possibly', that's because I think having a nonzero ballistics factor pulled in should be considered only after thorough playtesting (which is not the case in the current patch).

Would be interesting to check if this affects framerates on big battles.

One thing to notice though, is that as the game currently stands, units can perfectly estimate the position of their target, i.e. perfect "ballistics".

Yes there is perfect ballistics by default in the game.

I see! Here's hoping we get more possibilities (techs, or rebalancing on higher accuracy with less damage) to increase accuracy in the future.