Ahh, good job for fixing that up.
But, and I don't mean to be disparaging at all, you probably didn't need to go through all that. SH4 scales everything from a base screen width (1024 pixels), so you probably could have derived everything from the scope texture.
I haven't had time to try this, but here's how I would have done it (and how I have done it for Armed Assault). If you open the scope texture, you can count the pixels between each tick. The one I just measured has 68 pixels between each group of four ticks. If each tick is 15 MoA, then the scope is obviously scaled for 68/(4*0.25) = 68 pixels per degree in high magnification. High magnification is 6x, so the base magnification is then 68/6 = 11.33 pixels per degree at unity. The texture width is 1024 pixels, so the base field of view should be 1024/11.33 = 90.35 degrees. This number goes in AngularAngle.
Am I close to what you've come up with?
Personally, though, I think AngularAngle should be as close to the angle taken up by your monitor in your field of view (I usually say 25-35°) as is practical. Then optics should be scaled to that. The problem, of course, is that many optics have apparent fields of view much greater than 35° (our submarine periscopes have a 48° apparent field of view, for example), so you have to either cut off the sides or shrink them down to fit on the screen. Pretty much every developer chooses the latter path. But with AngularAngle set to 90 degrees, a 6x periscope only looks like 2x magnification to my eyes.
Eventually I wanted to redo the TBT/UZO, binocular, and periscope overlays for a common base field of view somewhere around 48 degrees (and get rid of the god-awful two-circle thing in the binocular overlays -- I really hate that convention), but I haven't had the time or inclination.
EDIT:
The BetterScopes textures are completely different from what I just measured. So these numbers don't apply at all. Just measured BetterScopes 1.3 and found scales of 90 pixels per degree for the attack scope and 103 pixels per degree for the observation scope. Those should give AngularAngle values of 62.27 and 59.65 respectively.
EDITx2:
After testing what I've typed here, I have to conclude that it doesn't work. It's close, but not quite there. I really can't imagine why it fails. It's not scaling the reticle texture any, so either SH4 uses some non-standard projection to display things onscreen or AngularAngle isn't actually in degrees. I haven't found a relationship between what I've come up with and what's needed for accurate display yet.
Last edited by NonWonderDog; 03-18-08 at 12:06 PM.
|