I know it's internal thing, but I still want to share my thoughts about aiming algorithms used in OpenXcom.
As I remember, initially (when Daiky started Battlescape) OXC was using simplest method of choosing the voxel to hit. It was either the middle of unit, or 3/4 of the height (to target the chest/head). Just two points. Yeah, that simple.
Then I changed that, made something vanilla alike, but with more precise height scanning (in vanilla it's 4 different height levels, and I made it scan each 2nd voxel). For each height level, starting with the middle, it tries 5 different inner voxels - central, and 4 at each side (depending on unit width, at the north, west, south, and east side).
After that I thought that I might scan unit more "optimized" way, using trigonometry, and turning target "plane" facing towards the shooter. So I had to check only 3 voxels instead of 5, for each level (plus top and bottom).
And it's how it works right now, pretty optimized, imposter-like shooter-aligned plane.
But in fact, it heavily suffers from the "obstacle" factor. In short - it always choses the available target voxel closer to the center of the unit. Even if it's next to wall or fence. So it often happens, that shown chances (which might be even 110%) doesn't reflect the reality, just because there are chances to deviate 1 pixel aside, and it will hit obstacle.
Target at the right will be hit with much more chances than target at the left, inspite of exactly the same distance. Because of obstacle issue. Random deviation is shown with highlighted ellipse. Without any obstacles it would be 100% chances to hit. But in fact, it will be 80% for the target at the right, and just around 30% for the target at the left.
It often happens when target is above and you're shooting and hitting the roof tile (which is obviously almost impossible, because you see only 1 voxel of the roof, being at the ground level), or targets at the corners. Sounds familiar?
I want to change that. I'm experimenting with aiming algorithm which gonna target the most visible part, not just the center.
Here are 3 different scenarios, blue is an obstacle or "miss", number is an aiming weight value. The more the number, the more chances this target voxel has when aiming.
First two are from the example above, and the third is "target behind the fence" (which is also often the case).
With these changes made, you hardly would be able to hide over the corner or behind the gear. Neither aliens. So battles will become slightly more brutal, and quicker. But hey, isn't this "dumb miss" the thing you always wanted to get rid of, and was often pissed off about?