Comments (12)
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 [email protected]
on 4 Mar 2011 at 1:11
from shifterdx.
Actually...
With values of 66, @1680x1050 it matches up perfectly with the cross squares
@640x480!
Hahah! I am so persistent!
Original comment by [email protected]
on 4 Mar 2011 at 1:59
from shifterdx.
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 [email protected]
on 4 Mar 2011 at 5:47
from shifterdx.
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 [email protected]
on 4 Mar 2011 at 6:01
from shifterdx.
// 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 [email protected]
on 4 Mar 2011 at 6:09
from shifterdx.
[deleted comment]
from shifterdx.
[deleted comment]
from shifterdx.
1.33 = 4:3
Original comment by [email protected]
on 9 Mar 2011 at 2:59
from shifterdx.
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
from shifterdx.
Yeah, got it. accuracyMultiplier should just be Round(106.0/aspectRatio).
Pretty slick.
Original comment by yukichigai
on 18 Jul 2013 at 1:10
from shifterdx.
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
from shifterdx.
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
- Changed state: Invalid
from shifterdx.
Related Issues (9)
- Shifter + TNM: Status (OTP topic)
- Intro problem HOT 2
- Various Minor Fixes HOT 3
- Thermoptic armor does not hide you from bots and cameras. HOT 3
- Huge decals with with HDTP beta3 HOT 1
- Open books rendered in grey/red/blue with HDTP HOT 1
- Dynamic HDTP flare effects
- Cigarette smoke causes NPCs to go hostile
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shifterdx.