Author Topic: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time  (Read 42278 times)

0 Members and 1 Guest are viewing this topic.

Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Hi, thanks for all your work. But im pretty new to this stuff and it dosent work for me. My launcher freezes when i try to select the exe file. Could you perhaps do a step by step on howto use your patch? im not sure ive done it correctly.

thanks alot

 

Offline Yarn

  • 210
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Does it freeze if you try to select a normal 3.7.0 build? If so, which ones (standard, SSE, no-SSE)?
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
hi thanks for your reply. No, it dosent freeze with the normal executables. Just when i try to use fs2_open_ant_7r_INF, fs2_open_3_7_1_SSE2_Yarn, fs2_open_3_7_1_SSE2_BP_Yarn, fred2_open_3_7_1-20131127_r10174. These are the ones ive tried, with hud tables, and your patch for the hud without. But they all freeze both launchers.

 

Offline Yarn

  • 210
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Try both of the attached builds and tell me which ones work. They're built with Visual Studio 2013 from the 3.7.0 branch without changes. If any of them crash or freeze, I want you to give me your system specs, primarily your operating system and CPU.

For the record, fs2_open_ant_7r_INF is old and obsolete, and all of its features have been in regular builds since 3.6.14.

[attachment deleted by an evil time traveler]
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
yea ok, i was just trying alot of different files to see if they would work. the same issue happens, but now i noticed that my launcher says "executable does not exist". im adding a prt screen so u can see.

my system specs are:
Win 7 64 bit
amd athlon 2 x4 640 3ghz
16gb ram
AMD Radeon HD 6900 Series primiary
AMD Radeon HD 6670 secondary

and i have 2 20 inch and one 24 inch monitor connected to primiary for eyefinity. and a tv on the secondary.

thanks alot for helping me out.

[attachment deleted by an evil time traveler]

 

Offline Yarn

  • 210
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
So you tried both builds ("fs2_open_3_7_0_test" and "fs2_open_3_7_0_SSE2_test") and they both froze, correct?


(Protip: To keep animals out of your posts, spell "a lot" correctly. It's two words, not one.)
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
hehe, ok will do. was wondering why that kept happening. Yea they both froze with wxlauncher and fs2 open launcher. Do you know why?

 

Offline Yarn

  • 210
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Try renaming one of the builds to something short (no more than 14 characters) and then selecting that. If it still freezes, then something about your computer doesn't like most of the builds found here.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
no still freezes. Thanks for trying tho. Thankfully i can still play the game, so not the worst case. This fs2 open is pretty amazing.

 

Offline Yarn

  • 210
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
I can think of only four possible reasons for this happening:
  • your OS X mod
  • your CPU
  • bad drivers
  • malware (have you run a scan lately?)

Unfortunately, you might have to reinstall Windows to make the other builds work, and even that might not help, especially if your CPU is the problem.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Its probably my cpu then. I got it a year or two ago with the moba and it was pretty cheap. The osx mod is just an installable skin pack, my antivirus runs day n night and i had a fresh install of win 7 a couple weeks back.

ill try to disable my osx skin and update my drivers. Hopefully that does it!

 

Offline MachManX

  • 26
  • The Fight Never Ends...This Is A Fact Of Life!
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Well there are a few questionable files that I see.  Why do you have 3 data folders?   You should only have "data" folder.  I dunno why you have a CD.dll file and what that gfw_high does either.  Google search indicates that it is something that comes with PlayonMac, which is used on a Mac, and yet you say it's not.  I mean your specs are PC type.  So why do you have PlayonMac files in that folder?  I can only assume that there is something you're not telling us as the gfw_high file is the proof.

So let me ask you this:  Is that a clean installation of FS2 or did you copy it from somewhere, say, from a Mac?
AMD Ryzen 5 3600
B450I GAMING PLUS AC
Geforce GTX 1060 6GB
16GB DDR4-3600
WD SN750 1TB NVME
Samsung 850 EVO 250GB SSD
Corsair HX520W PSU
Cougar QBX Case
NEC V422 42" @ 1080p
Ubuntu 20.04 + Whatever I VM

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Why do you have 3 data folders?   You should only have "data" folder.

GOG.com version of Freespace 2 has 3 data folders. Data2 and data3 only have cutscene.mve -files in them (10 in total).

Anyway,

I was noticing that this Adaptable_HUD patch no longer has any effect on the new MediaVP_2014 Beta, at least with a 16:9 monitor. No difference between this build and the newest nightly. However, the new HUD (even though it's NOT stretched anymore) is a bit buggy, as I demonstrated in the release thread.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
That'd be because the new mediavps beta contains a hud gauges table designed for widescreen monitors, and that would be overriding Yarn's changes.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Well there are a few questionable files that I see.  Why do you have 3 data folders?   You should only have "data" folder.  I dunno why you have a CD.dll file and what that gfw_high does either.  Google search indicates that it is something that comes with PlayonMac, which is used on a Mac, and yet you say it's not.  I mean your specs are PC type.  So why do you have PlayonMac files in that folder?  I can only assume that there is something you're not telling us as the gfw_high file is the proof.

So let me ask you this:  Is that a clean installation of FS2 or did you copy it from somewhere, say, from a Mac?

all i did was a clean fs2 install and then the fs2 open full install on top. and my os is win 7. There might be some other exe files in my fs2 directory as ive tried several and not deleted all of the ones which didnt work.

 

Offline MachManX

  • 26
  • The Fight Never Ends...This Is A Fact Of Life!
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
I see.  I have a feeling that the PlayonMac stuff sitting in that folder might be the cause for the game not starting.  Somehow it might be overriding your OpenGL settings and trying to enforce them in a Mac-like execution.  This is mere speculation though.  Since you say you've tried multiple things, they could be somehow conflicting with each other. 

First I want you to try downloading an OpenGL test like GpuTest or FurMark to see if OpenGL works on your machine.  Don't run these tests for too long; anywhere below five minutes is fine unless you have absolute confidence in your machine.  These will really stress your machine but will tell if OpenGL works or not.

If the above works, then you're gonna have to do this:-

I recommend you just delete that Freespace 2 installation and start from scratch.  No need to reinstall Windows though. (Phew!)  You know how to do this, right?  Install Freespace 2, then download the latest 3.7.1 build (either in my previous posts or from the nightly builds).  Download the latest mediavps.  Download the campaigns.  Download wxlauncher.

Yes, you might have some of those files already, but unless they've been updated in the past month or two I'd recommend redownloading them, even if they are big downloads (mediaVPs can be big).  I did redownload myself.  Let's see: Builds go in main Freespace 2 folder or a subfolder if you prefer, MediaVPs go in "mediavps_3612" folder in the main Freespace 2 folder.  wxlauncher goes in main Freespace 2 folder.  Campaigns go in whatever folder they extract as, BUT make sure they only go 1 level deep, ex: Freespace2/Sync . 
AMD Ryzen 5 3600
B450I GAMING PLUS AC
Geforce GTX 1060 6GB
16GB DDR4-3600
WD SN750 1TB NVME
Samsung 850 EVO 250GB SSD
Corsair HX520W PSU
Cougar QBX Case
NEC V422 42" @ 1080p
Ubuntu 20.04 + Whatever I VM

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
You could just verify the MD5 checksums of the large files and move them to your new install one at a time as you verify.  It might seem tedious but it's probably faster than redownloading (moving a file is instantanious while even a high-speed download will take minutes / hours)

Use the program HashTab to verify the MD5.

Just right-click the file, click properties, then File Hashes, then paste the correct (from the forums) MD5 into the compare box and it will tell you if it's the exact same or not.  If it is, move that file to the new install directory.

Just a thought.

 

Offline Yarn

  • 210
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Well there are a few questionable files that I see.  Why do you have 3 data folders?   You should only have "data" folder.  I dunno why you have a CD.dll file and what that gfw_high does either.  Google search indicates that it is something that comes with PlayonMac, which is used on a Mac, and yet you say it's not.  I mean your specs are PC type.  So why do you have PlayonMac files in that folder?  I can only assume that there is something you're not telling us as the gfw_high file is the proof.
All of the files and folders that you're questioning here is normal for GOG.com installations. Gfw_high.ico is just an icon file for the desktop and start menu shortcuts, and data2, data3, and CD.dll exist so that the original CDs are not required. They have nothing to do with PlayonMac.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline niffiwan

  • 211
  • Eluder Class
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
I've finally got m!m's common hud parsing merged with Yarn's patch.  I thought I try using the github pull process to get this reviewed, basically as a demo of how this could all work when we switch to git :)  (note; DO NOT actually merge the pull request, it'll need to be converted & committed to SVN once the review process is completed)

Anyway - could someone please review my changes to ensure I haven't affected the behaviour of Yarn's original patch?
https://github.com/scp-fs2open/fs2open.github.com/pull/1

Here's the feature branch if you want to pull it down to compile/test:
https://github.com/niffiwan/fs2open.github.com/tree/yarn_hud

If you want to grab it via SVN, it's a little different from normal:
Code: [Select]
svn co -N https://github.com/niffiwan/fs2open.github.com fs2open
cd fs2open
svn up -N branches
svn up branches/yarn_hud
cd branches/yarn_hud

edit: typos
« Last Edit: December 08, 2013, 04:33:33 am by niffiwan »
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Yarn

  • 210
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Anyway - could someone please review my changes to ensure I haven't affected the behaviour of Yarn's original patch?
The only problem that I noticed is that the if statement at line 1,115 in hudparse.cpp is missing an else statement that calls adjust_base_res(). Because of this, positionless gauges (such as target brackets) that are specified in a HUD table will stretch. (I'd post a patch, but I can't figure out how to create one. I'm using TortoiseGit, by the way.)

Another thing: the gauge_load_common() function has a parameter called default_position. It defaults to false, and no calls to this function ever set it to true. What is this parameter for?

EDIT: Oh, and you've got two semicolons at line 5,087 in hudparse.cpp.
« Last Edit: December 08, 2013, 11:15:23 pm by Yarn »
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178