aliens

Author Topic: Aiming algorithm  (Read 33671 times)

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Aiming algorithm
« Reply #15 on: March 03, 2015, 03:55:01 pm »
How about targeting the center of the largest visible area but having a hit % chance equal to the % of visible target area.

That means that being in cover is way better than being in the open.




I hope I worded this right

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #16 on: March 03, 2015, 04:23:56 pm »
What for? Random spread already making miss working that way.
« Last Edit: March 03, 2015, 04:27:59 pm by volutar »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Aiming algorithm
« Reply #17 on: March 03, 2015, 04:43:08 pm »
I think the main problem with altering this aspect pf the game, is that.. more things are involved in the overall final perceived behavior, and all these things are "compromises". For example the voxel aliases of items/creatures: a humanoid shape is a cylinder, a big chicken (sectopod) is a cylinder, many tiles (especially new ones, since you have to use the same shapes) are "seemingly random half-floating kind-of-boxes". So you make one single aspect "less of a compromise" but the rest remains the same, with the result that it won't amalgamate as well as before. Like in this case the new proposed aiming is going to make lots of half-covers useless (more noticeably against aimed shots, as far as I understood your explanation), in exchange of reliable aiming in some situations: not a trade I would like.


Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #18 on: March 03, 2015, 04:47:01 pm »
Like in this case the new proposed aiming is going to make lots of half-covers useless (more noticeably against aimed shots, as far as I understood your explanation), in exchange of reliable aiming in some situations: not a trade I would like.
If you're making aiming shot with 110% of accuracy, you will actually have less than 50% chance. Is it fair?

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Aiming algorithm
« Reply #19 on: March 03, 2015, 05:37:19 pm »
If you're making aiming shot with 110% of accuracy, you will actually have less than 50% chance. Is it fair?
But with half-covers turned useless, is the change an overall improvement?

Also "fair"... As I said: it is (or looks like, to me) all a big compromise. It can also be considered "fair" too: 110% can be interpreted as "chance to hit an uncovered target", and a significant reduction can be expected if half the target is behind cover. This is to me more natural and, more importantly, fun, than having the half-cover doing near to nothing.

Each of us has his own idea about these things; for example ranged accuracy: some find it a must, others -myself included- don't like it at all. Vanilla is the base we can all understand and accept. So if you decide to make the change, I think the option to use vanilla-ish "dumb" aiming should be included.
« Last Edit: March 03, 2015, 05:39:09 pm by robin »

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #20 on: March 03, 2015, 05:42:41 pm »
But with half-covers turned useless, is the change an overall improvement?
Not useless, they just stop being exploits vs costy aim. And stay the same for snap and auto.

And it's not a compromise, it's more vanilla than current OpenXcom way. Vanilla got only 3x4 grid - just 12 target points, so in most of cases the target voxel was at least 1 voxel away from the obstacle, and AIM was hitting the target. In OpenXcom we have a grid 3x10, with really precise vertical, which OFTEN choses the voxel at the edge of obstacle, which instantly lessen chances by 50% for AIM.

But this 3x4 low-precision grid has this "aiming" benifit comparing to current OXC way as a side effect, not intentionally, not controlled. It must be controlled, and logical.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Aiming algorithm
« Reply #21 on: March 03, 2015, 06:54:25 pm »
Arthanor,
why do you think I'm worried about the numbers at the UfoExtender cursor? Frankly I don't give a shit about it (I'm not a fan of this mod). I've started this because of initially bad aiming algorithms.
You've mentioned "tactical elements". I'm naming them "exploiting algorithm/AI flaws". As with dropping weapon with MCed alien, and be 100% sure it will never pick it up.

Really bad reference for the tactics.

Sitting behind a low wall/fence/staircase/chair/corner is not "exploiting algorith/AI flaws" it is using cover. Making use of cover is one of the most basic tactic. You don't stand in the open. Of course, if you can, you get out of sight, but a game that is strictly about line of sight and exploiting smoke is less interesting than one where you can duck behind a wall and be harder to hit.

This situation can all be summarized in a few simple questions:
  • Should a shot actually hit the target with (almost) exactly the odds that are displayed to the player?
  • Should you have the same chance of hitting a target that's hiding behind cover as one in the open?
  • Should the game display the same odds of hitting a target in the open versus one in cover?

My answers are:
- Yes, obviously.
- No, obviously.
- No, obviously but that's what both vanilla XCom and OpenXCom do.

How can that be fixed? There are two ways:
1 - Make cover essentially irrelevant so that the constant % displayed is accurate no matter what cover the target is in (Your solution, since you would pretty much only hit cover on a miss).
2 - Show a different number if the target is in cover.

Where would you show that different number? On the cursor like Extender Accuracy. I am using the % displayed by the extender accuracy as an example of placement. I couldn't care less whether you like that mod or not, use it or not, or whatever. It is a way to tell you where I think the % should be displayed as part of the suggestion I am making for an alternate solution. Besides the % being displayed at the same place, what I am suggesting has nothing to do with Extender Accuracy (and works with both vanilla and Extender Accuracy schemes).

I fully agree with those saying that the vanilla XCom system is a finely tuned compromise made out of a series of approximation to reach a desired effect. Changing one of these approximations (even if to make it better) changes the outcome.

In this case, changing the way aiming is done to make it more intelligent means an overall reduced effect of cover, which isn't a good thing in a tactical game. Hiding behind obstacles should matter. An aiming algorithm where "properly aimed shots" are as likely to hit a full bodied target in the open as to hit their toes sticking out from behind cover dumbs the game down. Vanilla XCom represents cover by making "shots on target" sometimes hit cover. If we take that out, this new XCom needs another way to represent cover.

The ideal situation would be to change the way aiming is done and change the way cover is handled in order to maintain the vanilla balance (and relevance of cover) while also improving the information provided to the user. If you don't want to tackle both aiming and cover to maintain the balance, I would rather you don't touch either.

What's left is that the information provided to the player could still be improved by showing a different number when the target is in cover (multiply the accuracy % by the proportion of the target area that is obstructed by cover). The aiming & cover mechanics don't change, but with the new info they also no longer deceive the player.

I don't think a change that makes cover even less relevant is a good thing for the game. To me, LoS tricks (step forward, spot, step outside of LoS range, fire from safety), especially dancing in the smoke, are much more akin to exploits than kneeling behind a wall to get cover. These LoS tricks should not be reinforced further as the primary way to preserve your soldiers.

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #22 on: March 03, 2015, 08:45:26 pm »
Arthanor, I already told you, I don't care abount numbers, they has nothing with hit chance, and let them be. They simply don't affect anything.
Did you even read what's written next?
Yes, AIM mode is stands for AIMed shots, even aiming your sticking toes, if they got bad luck. It's how precise sniping works.
And currently it works noticeable WORSE than in vanilla, it hits obstacles 2 times more often for aimed shots.. Oh god. Do I really need to repeat myself??
« Last Edit: March 03, 2015, 08:55:16 pm by volutar »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Aiming algorithm
« Reply #23 on: March 03, 2015, 09:12:06 pm »
Not useless, they just stop being exploits vs costy aim. And stay the same for snap and auto.

And it's not a compromise, it's more vanilla than current OpenXcom way. Vanilla got only 3x4 grid - just 12 target points, so in most of cases the target voxel was at least 1 voxel away from the obstacle, and AIM was hitting the target. In OpenXcom we have a grid 3x10, with really precise vertical, which OFTEN choses the voxel at the edge of obstacle, which instantly lessen chances by 50% for AIM.

But this 3x4 low-precision grid has this "aiming" benifit comparing to current OXC way as a side effect, not intentionally, not controlled. It must be controlled, and logical.
The 3x4 grid seems a more sensible solution than both the current and the proposed one: it ease the problem of the first (selecting voxel just above cover edge thus butchering effective accuracy), without the alteration of gameplay of the second (quoting you directly:
you hardly would be able to hide over the corner or behind the gear [...] So battles will become slightly more brutal, and quicker.
).

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #24 on: March 03, 2015, 09:15:22 pm »
The 3x4 grid seems a more sensible solution than both the current and the proposed one: it ease the problem of the first (selecting voxel just above cover edge thus butchering effective accuracy), without the alteration of gameplay of the second (quoting you directly:).
No it's not. Because you will get "no line of fire" 3 times more often. Inspite of seeing unit and having direct line of fire.
And if there will be line of fire, you will not miss. So it will be same as I quoted + extra no line of fires.

The only sensible solution is to deal with what I proposed.

You guys are really weird, prefer to stick to flawy solution #1 (no line of fire) or flawy solution #2 (hitting obstacles even with aimed shots). It' s like you love bugs and ugliness. Do you really like to be ashamed?
« Last Edit: March 03, 2015, 09:26:42 pm by volutar »

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Aiming algorithm
« Reply #25 on: March 03, 2015, 09:43:33 pm »
No it's not. Because you will get "no line of fire" 3 times more often. Inspite of seeing unit and having direct line of fire.
And if there will be line of fire, you will not miss. So it will be same as I quoted + extra no line of fires.

The only sensible solution is to deal with what I proposed.

You guys are really weird, prefer to stick to flawy solution #1 (no line of fire) or flawy solution #2 (hitting obstacles even with aimed shots). It' s like you love bugs and ugliness. Do you really like to be ashamed?
Then this should have been locked, with "deal with it" written from the start.

In the first of your three scenarios, to me it makes no sense that the cover doesn't count at all (provided I'm interpreting the picture correctly, all the blue voxels have "0" weight), even if it's an aimed shot. This is not making partial covers not exploitable, but it's making them useless. I don't care about ugliness.



Offline kikimoristan

  • Commander
  • *****
  • Posts: 647
    • View Profile
Re: Aiming algorithm
« Reply #26 on: March 03, 2015, 09:45:21 pm »
volutar's idea should be used at least for aimed shot in order to make it more accurate over snap/auto.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Aiming algorithm
« Reply #27 on: March 03, 2015, 09:54:49 pm »
You are such a gentle debater volutar.. respectful and all...

What we want is a tactical game in which cover is relevant (yes, even against aimed shot because it should be more difficult to hit a partially obscured target). The actual mechanic that achieves best that is up for debate.

I did read everything you wrote and in fact I even support your proposition of improving the algorithm to choose a target.

The problem is that, unlike you, we feel that all shots (aimed shots included) should still suffer from cover on targets. Weapons in XCom are not scoped sniper rifles but assault rifles, pistols and whatever a heavy laser/plasma/cannon is supposed to be. They should not have the accuracy to pick toes as reliably as whole bodies. Especially since there is no effect of hit location on damage, so you can essentially be "headshot" (= high damage) in the toes (because that was the visible area).

Center the target voxel better, but make your target area (highlighted ellipse) larger so cover still has some effect and that sounds like a great solution. Change the size of the highlighted ellipse with the shot type for bonus points.

You can't rely on "near misses" that hit obstacles to represent the effect of cover because those are much too rare compared to hits + all  the other misses.

@tollworkout: Aimed shot are already more accurate..? Changing the size of the target area (the highlighted ellipse in volutar's 1st post) would make more sense than changing the placement which should always be for center of visible area.

Offline volutar

  • Colonel
  • ****
  • Posts: 351
  • Vanilla digger & Quality assistant
    • View Profile
Re: Aiming algorithm
« Reply #28 on: March 03, 2015, 09:58:19 pm »
In the first of your three scenarios, to me it makes no sense that the cover doesn't count at all (provided I'm interpreting the picture correctly, all the blue voxels have "0" weight), even if it's an aimed shot. This is not making partial covers not exploitable, but it's making them useless. I don't care about ugliness.
Partial covers shouldn't matter as much for aim as for snap. Scenarios showing the best aimed voxel, not the cloud itself. And cloud of probability is much bigger than this grid. Partial covers doesn't matter that much in vanilla.

Oh god. Who am I talking to... Did you even see vanilla algorithms and hit/miss statistics? Why are you people pushing me towards hating you?

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: Aiming algorithm
« Reply #29 on: March 04, 2015, 11:00:29 am »
Hum I don't understand anymore, but: I find out that I don't like how it changes things, can I eventually make a fork to have an OpenXcom build that exclude this specific change?