Author Topic: No way in hell  (Read 24263 times)

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
No way in hell
« on: November 25, 2015, 07:51:21 pm »
Well, I know, last time I opened up a debate about this aspect, it turned warboy a little bit angry. However, I think it still needs some addressing.

It's about hitting apparently impossible targets, while the engine doesn't seem to recognize them as impossible to hit. I created such a situation, shown in the attached image. You can reproduce them like that, but there are many other situations, that act like this one.

If you want to take out the snakeman in the right upper corner of the room with the soldier kneeling in front of the door, you won't hit it from that position, regardless of kneeling or standing and regardless of your accuracy or used non explosive weapon. Even with Accuracy 180+ you won't succeed in hitting the snakeman from the door, unless you use a weapon with splashdamage. There's simply no way in hell, to hit a unit in the right upper corner from the position at the door, inside the room. However, the engine doesn't seem to recognize that and let's you empty every clip you have, unless you realize, that you simply won't hit the target this way.

Last time I had this discussion, I wasn't sure if I just wasn't able to express my thoughts properly or not. But the situation in the picture seems to be quite reliably acting in the way I described above and is easily created. And the result is rather self explanatory. Can someone confirm the disability to hit a unit in this specific constellation? (I'd give you the savedgame, however it's heavily modded, so most players couldn't do a lot with it anyways...)

Offline hellrazor

  • Commander
  • *****
  • Posts: 2027
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: No way in hell
« Reply #1 on: November 25, 2015, 09:55:54 pm »
Well i do have a similar situation like this, recorded on video here(dropboxlink)

Savegame attached.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: No way in hell
« Reply #2 on: November 26, 2015, 01:03:59 am »
A "voxel screenshot" (F10 key, needs debug mode active) would be helpful to show what your unit actually sees (and how the chair is in the way)
It's what I did in this older post, to illustrate the common case of two units in diagonal positions, with  a single wall covering "half" of the line of sight
https://openxcom.org/forum/index.php/topic,3672.msg46492.html#msg46492

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: No way in hell
« Reply #3 on: November 26, 2015, 01:15:32 am »
Maybe it's because of the original sin - "see by eyes, shoot from shoulders". But indeed, such situations happen with irritating - even predictable - regularity, like firing upon someone on the mountain-top - his head is visible, but your gun will never hit it even if you shot a 100 times with 200% accuracy. Or shooting across some bushes on the jungle map, and on and on.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: No way in hell
« Reply #4 on: November 26, 2015, 01:36:16 am »
Volutar described those situations and how the algorithm used for aiming (pick visible point that is closest to middle of body) fails in this case, and how he could make it aim at the middle of the visible target instead to help. But there was a huge argument stemming from misunderstandings and I don't think anything was ever considered.

But in this case, you aim at the point closest to the center, you fire from your center, and with the minimal deviation of shots with high precisions, you can't hit. If you have lower accuracy, the added deviation could actually make you hit some times (weird!) and, if we had volutar's algorithm, you would likely hit.

There's also this cool thing where OpenXCom units used to shoot from the hand that carried the weapon (so you could put a weapon in the right hand, hug a wall to your left, and an alien would likely hit the UFO wall on his right with his right handed weapon whereas you could return fire properly with your left hand), but it was deemed bad for the complicated TftD maps and OpenXCom returned to the original "fire from the middle" mechanic regardless of hands.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2027
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: No way in hell
« Reply #5 on: November 26, 2015, 04:24:04 am »
Voxelscreenshot attached.

Represents the voxelview of the soldier shooting the muton in the Video i linked from my dropbox.
First screenshot is kneeled down (problem shown in the video occurs).
Second screenshot is standing (no problem).
« Last Edit: November 26, 2015, 04:28:10 am by hellrazor »

Offline hellrazor

  • Commander
  • *****
  • Posts: 2027
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: No way in hell
« Reply #6 on: November 26, 2015, 04:34:01 am »
Maybe it's because of the original sin - "see by eyes, shoot from shoulders". But indeed, such situations happen with irritating - even predictable - regularity, like firing upon someone on the mountain-top - his head is visible, but your gun will never hit it even if you shot a 100 times with 200% accuracy. Or shooting across some bushes on the jungle map, and on and on.

Yeah those can occur quite on a regular scale. Especially if you are fighting in a lot of mountain terrain, were those situations happen more often.

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: No way in hell
« Reply #7 on: November 26, 2015, 12:16:42 pm »
Here's mine. And yes, of course there's a chair in the way, it was quite obvious, that this seems to be the problem. :P Don't get me wrong, I know, where the problem is coming from. And it's OK, that there's this obstacle. But the engine doesn't seem to agree on that, as there is that exceptionally small possibility to hit the target. So in order to avoid wasting rounds (and turns), you will really really have to know, whether the engine will kick your but like this, or not, in advance. Imagine a new player, not aware of this phenomenon. OK, forget the new player, think about how annoying it is to veterans... It's simply an unnecessary problem for players. It's like: When new UFOs appear in this special order (or over this special pixel on the geoscape), you will not be able to down them, even if you have 100 Avengers firing their plasma guns empty. First, you will have to know that, and second, it'd still drive you nuts.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2027
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: No way in hell
« Reply #8 on: December 09, 2015, 12:43:17 pm »
Volutar described those situations and how the algorithm used for aiming (pick visible point that is closest to middle of body) fails in this case, and how he could make it aim at the middle of the visible target instead to help. But there was a huge argument stemming from misunderstandings and I don't think anything was ever considered.

It's a shame that it never was even considered. Since aiming on the visible part is usually the natural thing you would assume from a shooter with a dircet to hit fire weapon (like a Rifle e.g.).
I consider this a bug for myself, which i want to have fixed in the future.

But in this case, you aim at the point closest to the center, you fire from your center, and with the minimal deviation of shots with high precisions, you can't hit. If you have lower accuracy, the added deviation could actually make you hit some times (weird!) and, if we had volutar's algorithm, you would likely hit.

Thats excactly the point.

Maybe it's because of the original sin - "see by eyes, shoot from shoulders". But indeed, such situations happen with irritating - even predictable - regularity, like firing upon someone on the mountain-top - his head is visible, but your gun will never hit it even if you shot a 100 times with 200% accuracy. Or shooting across some bushes on the jungle map, and on and on.

Indeed lets change it.

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: No way in hell
« Reply #9 on: December 09, 2015, 01:01:39 pm »
It's a shame that it never was even considered. Since aiming on the visible part is usually the natural thing you would assume from a shooter with a dircet to hit fire weapon (like a Rifle e.g.).
I consider this a bug for myself, which i want to have fixed in the future.
Exactly that. I mean, it's not counter-strike, where it's helpful to try to shoot through walls... Either aim at visible parts or make it a no-LOF-case, where the engine simply refuses to fire at that position. Otherwise it's just messing around with the player. Or at least, give the player something like in ufo2000, where you can make the game make you show the trajectory a straight aim would take.

Offline Nikita_Sadkov

  • Colonel
  • ****
  • Posts: 286
    • View Profile
Re: No way in hell
« Reply #10 on: December 11, 2015, 12:59:34 pm »
Why not make it as simple as "if you can see it, then you can hit it"? I.e. just roll a dice for any transparent obstacles, when dice fails, hit the obstacle instead of target.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: No way in hell
« Reply #11 on: December 15, 2015, 04:01:00 am »
Why not make it as simple as "if you can see it, then you can hit it"? I.e. just roll a dice for any transparent obstacles, when dice fails, hit the obstacle instead of target.

This is interesting low-cpu use solution, but not neccesary IMO - all it would take would be to place "seeing pixel" and "firing pixel" in the same exact position in space. Well it wouldn't heal all the problems, but at least some of them. It'd be awesome if it was possible to shift the firing/looking point to the side, for example, by entering a command, or automatically - this would erase another stupid situation, where when you stand next to a corner, you cannot shoot but can be shot at. In normal world, the soldier hugging the corner has an advantage, not the other way around.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: No way in hell
« Reply #12 on: December 15, 2015, 02:53:25 pm »
can see == can shoot is too simplistic because there are many times when you can't see a unit, but you are allowed to shoot : darkness, smoke cover, 20-tile daytime range...

However, I don't understand why the game uses two different systems for determining :
1) is shooting allowed (yes/no)
2) actual trajectory if you fire or force-fire
The infuriating cases are when 1 says "no problem" while 2 aims at an obstacle

Offline 7Saturn

  • Colonel
  • ****
  • Posts: 457
    • View Profile
Re: No way in hell
« Reply #13 on: December 15, 2015, 03:15:43 pm »
It's a detail: It is in principle possible to hit the target. That's important to understand, why the engine isn't refusing fire. However, as it's blocked to a great extend/in an unfavorable way, it's practically impossible to hit, anyways. That's the core of the problem. These nearly-impossible targets however, are greatly annoying, as the player is simply used to accept the binary decision of the engine: If the engine allows to fire at the target, it's as likely to it it as the accuracy permits. In fact the accuracy is down to almost zero, in these situations, which you can't foresee without a big deal of experience with it. That's the problem. It behaves in a completely atypical manner. But there are solutions, which should make this problem much more rare (limited to situations, where the target actually is almost 100% covered by obstacles). E. g., aim for the center of the biggest visible part of the target.

Offline Shoes

  • Commander
  • *****
  • Posts: 502
    • View Profile
Re: No way in hell
« Reply #14 on: December 15, 2015, 03:40:11 pm »
What if there was a multiplier added to the accuracy % based on how much alien is visible. Sectoids would be "harder" to hit than sectopods when both are in plain sight, and a muton facing to your left or right would be "harder" to hit than a muton facing you. If there are obstacles blocking the way more, you reduce the multiplier accordingly.

I have no idea how something like this would be calculated.