Closed GoogleCodeExporter closed 8 years ago
Nevermind...
I see it was intentional, since weapon accuracy is decreased as the screen
resolution increases. 60 isn't perfect, but neither will any other value at
different resolutions.
Original comment by surma.an...@gmail.com
on 4 Mar 2011 at 1:11
Actually...
With values of 66, @1680x1050 it matches up perfectly with the cross squares
@640x480!
Hahah! I am so persistent!
Original comment by surma.an...@gmail.com
on 4 Mar 2011 at 1:59
Hey man... problem solved. Here's the code:
w = width;
h = height;
.
.
.
aspectRatio = w / h;
accuracyMultiplier = 80; // 80 was original, 60 is Shifter
if (aspectRatio == 1.6) // DJ: 16:10 aspect ratio
{
accuracyMultiplier = 66;
}
else if (aspectRatio == 1.25) // DJ: 5:4 aspect ratio
{
accuracyMultiplier = 85;
}
// else: assume 1.33 aspect ratio, so stick with 80
// mult = FClamp(weapon.currentAccuracy * 80.0 * (width/640.0), corner, 80.0);
mult = FClamp(weapon.currentAccuracy * accuracyMultiplier * (width / 640),
corner, accuracyMultiplier);
Original comment by surma.an...@gmail.com
on 4 Mar 2011 at 5:47
Someone else will have to test 16:9... I can't do it (hardware limitations)
I'll take a wild guess and say 60
Original comment by surma.an...@gmail.com
on 4 Mar 2011 at 6:01
// other if statements
.
.
.
else if (w >= 1920.0) // assume 16:9 aspect ratio (leaves out people on
1280x720 though)
{
accuracyMultiplier = 60; // Just a guess ;)
}
Original comment by surma.an...@gmail.com
on 4 Mar 2011 at 6:09
[deleted comment]
[deleted comment]
1.33 = 4:3
Original comment by surma.an...@gmail.com
on 9 Mar 2011 at 2:59
Wow, good catch. This is a rather neat solution to the issue. I'll tweak it a
bit so it can account for any oddball aspect ratios with a best-guess solution.
Thanks a lot.
Original comment by yukichigai
on 18 Jul 2013 at 1:06
Yeah, got it. accuracyMultiplier should just be Round(106.0/aspectRatio).
Pretty slick.
Original comment by yukichigai
on 18 Jul 2013 at 1:10
Oop, actually I realized something: that 60 was adjusted to bring the reticle
size inward to match the absolute outer edge of where bullets can go. This is
on a 4:3 screen. It doesn't actually improve weapon accuracy, it just makes
the display more truthful regarding where bullet distribution is.
Given this, the code should actually be 80.0/aspectRatio
Original comment by yukichigai
on 18 Jul 2013 at 1:22
Welp, so much for that theory. Turns out the code ALREADY corrects for aspect
ratio stuff. I checked the 60 value against a variety of resolutions and
aspect ratios using the laser sight. The laser sight simply adjusts its Pitch
and Yaw (rotational components) randomly based on the raw accuracy value of the
weapon, which (I did check) isn't based on resolution or aspect ratio. The
hardcoded 60 value keeps the reticle's edge lines EXACTLY lined up with the
range of the laser dot no matter what the resolution or aspect ratio.
Shifter's current accuracy calculation uses a similar formula.
In short, no fix needed, working as intended.
Original comment by yukichigai
on 18 Jul 2013 at 1:50
Original issue reported on code.google.com by
surma.an...@gmail.com
on 3 Mar 2011 at 1:05