Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: JOTRkid on February 14, 2007, 02:09:31 pm

Title: What the hell? My hud is crapped-out!
Post by: JOTRkid on February 14, 2007, 02:09:31 pm
I was playing, and i get the strange appearance of my HUD being massively out of line  with the enemy fighters, my ships turns, even guns! every time I turn, I may see a Mara move a few inches in my view, but the HUD trackers go 10 times the distance! I need help, this has even spread to regular old Freespace 2!
Title: Re: What the hell? My hud is crapped-out!
Post by: Turey on February 14, 2007, 02:37:53 pm
Did you change your monitor/resolution?
Title: Re: What the hell? My hud is crapped-out!
Post by: Snail on February 14, 2007, 04:20:05 pm
This is happening to me too. I think it's an axis problem. It is also happening with backgrounds.
Title: Re: What the hell? My hud is crapped-out!
Post by: Nuke on February 15, 2007, 12:03:45 am
post your resolution and build. then we might be able to tell you whats going on.
Title: Re: What the hell? My hud is crapped-out!
Post by: Snail on February 16, 2007, 08:41:57 am
Build: fs2_open_3_6_9
Resolution: 1280 x 800
Color Depth: 32-bit
Texture Filter: Trilinear

It doesn't bother me too much, just a little bugger that's kind of annoying.
Title: Re: What the hell? My hud is crapped-out!
Post by: Nuke on February 16, 2007, 03:07:20 pm
its those funky widescreen resolutions that screw things up. you could try tweaking your fov, not sure if that will work or not. none the less the hud should render properly regaurdless of resolution.
Title: Re: What the hell? My hud is crapped-out!
Post by: Backslash on February 16, 2007, 06:48:22 pm
It's a known issue.  When the aspect ratio is not standard, this is noticable.  Everything that is 2D like the HUD is rendered differently than things that are 3D.  Unfortunately fixing it takes a lot of math and graphics knowhow...
Title: Re: What the hell? My hud is crapped-out!
Post by: JOTRkid on February 17, 2007, 03:31:47 pm
post your resolution and build. then we might be able to tell you whats going on.

Build 3.6.9
Launcher 5.5
Res: 1920 x 1080

Yes, a am trying to play in ultra-high def.
Title: Re: What the hell? My hud is crapped-out!
Post by: Agent_Koopa on February 25, 2007, 12:10:35 pm
While we're on the topic, would it be possible to code the game so as to detect a widescreen aspect ration and add black bars on the sides to adjust? I'm sick of using an external monitor, and I've seen games that do it. I don't know if it would be possible to do this without much work though.
Title: Re: What the hell? My hud is crapped-out!
Post by: Wanderer on February 25, 2007, 12:52:37 pm
Play with 'run in window' option?

Like I have now.. FS Open running at 1280 x 960 while monitor is 1680 x 1050
Title: Re: What the hell? My hud is crapped-out!
Post by: Agent_Koopa on February 25, 2007, 04:32:01 pm
Yeah, well then we get the ugly window. If it's unfeasible to add a full-screen widescreen solution, I guess that's what I'll have to do.
Title: Re: What the hell? My hud is crapped-out!
Post by: Nuke on February 26, 2007, 11:48:34 pm
i think one of the major problems with implementing widescreen resolution support is that the programmers may not have access to those resolutions for testing.
Title: Re: What the hell? My hud is crapped-out!
Post by: Backslash on February 28, 2007, 01:14:07 am
nah, I can use widescreen resolutions.  And anyone can test a widescreen resolution, albiet with a little stretching, at least enough to see the bug you're describing.

The black bar idea is not bad, but only if you mean so that it pushes your aspect ratio to 4:3.  Otherwise, you'll still have the FOV bug I mentioned, as well as a related thing where models disappear when they reach the end of the screen before they've gone off it.  I've tried to fix this but the graphics code is SO far over my head. :sigh:

Somebody go figure out how to clone taylor, or kidnap a graphics code wizard from the outside  :p
Title: Re: What the hell? My hud is crapped-out!
Post by: taylor on February 28, 2007, 01:57:10 am
The black bar thing is really just a bad hack.  It would get around the problem, but in no way fix it.  The problem is that the engine is designed to work with a fixed set of reslutions, but to support all resolutions we have to scale everything.  All of the sizing would have to be seriously re-thought and all new code put in place to allow the game to properly deal with the over-wide resolution.  It's really just too much work for something that isn't really going to fix the problem, merely hide it.  New interface code is in the works which will finally be able to properly handle widescreen resolutions (mostly because it easily isolates the positioning and scaling of screen elements), but it will be a while before anyone sees it.

We might end up going with a temporary, and limited, black-bar support deal though, assuming that it can be easily coded.  It would basically just be what Backslash mentioned, a fixed 4:3 aspect.  So, running at 1280x768 would be the exact same as running at 1024x768, except that the screen would simply be centered and you would have two 302 pixel black bars on either side of the screen.  That isn't exactly a simple change though.  First we have to make such a thing optional, since undoubtedly some people aren't going to like it, and then we have to modify the graphics code to create a full screen window, yet artificially restrict the viewport to not only a particular size, but a particular position.  And the extra math will cost additional CPU time in all drawing functions.  A little annoying to say the least, but it is doable.

Testing widescreen resolutions is simple though, since you can just run the game in a window and use any resolution that you like.  That's what I've done in the past in order to test/fix issues, most recently the greatly improved widescreen support for movies.

The FOV issue will be fixed as soon as I figure out how best to do it.  The problem is that there are several different issues that need to be addressed, but I have a completely different fix for each one of them, and each fix is API specific.  I keep putting off doing anything about it since I would like to be able to come up with a simple, single, API agnostic fix that solves all of the problems.  In my mind I know what I want, but coding it is a far different story, especially considering that my brain is mathematically retarded. :)
Title: Re: What the hell? My hud is crapped-out!
Post by: Tolwyn on February 28, 2007, 06:11:44 am
The black bar idea is not bad, but only if you mean so that it pushes your aspect ratio to 4:3.  Otherwise, you'll still have the FOV bug I mentioned, as well as a related thing where models disappear when they reach the end of the screen before they've gone off it.  I've tried to fix this but the graphics code is SO far over my head. :sigh

Actually modern GPU driver can do this for you. There is an option in both Nvidia and ATI drivers to add black bars if you play in 4:3 resolution on a widescreen monitor.