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

0 Members and 2 Guests are viewing this topic.

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
LOD 1 is displayed in the target window by default. I'm not aware of any general-use case where that has been changed.

There is, however, a ships.tbl option to specify a different LOD in the target window for a particular ship.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
Uh, guys, it's me again. It happened yet again, in the exact same spot. Only this time, I was using Yarn's build exclusively through the entire campaign. The exact mission is right at the end, the the second of the two part series where you can't pick your ship. That's the same spot it was at the last time, and it's doing it again. Just like last time, making a new save works. But I only used fs2_open_3_6_19_SSE2_Yarn.exe. I haven't even touched the launcher in weeks. Oye. I was really hoping to finish this time...

As for how the error was created, I don't really know. I did the first mission, and then upon entering the second mission, I realized I was woefully equipped for it and bailed. I saved there and came back to it a couple days later, and boom, can't play it. Crap. At least, pretty sure that's where it was saved, to be honest it's been a couple of days and I didn't pay that much attention. It could be the first of the two. Anyway, I sent the error log last time, so is there anything else I can do?

 

Offline Yarn

  • 210
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
I know the campaign is long, but could you try playing through it again with the most recent nightly build, without my patch? I very strongly doubt that my patch is really causing the crash.
"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: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
IIRC there's been a few more red-alert bugfixes in trunk since Yarn created his exec.  If you post your pilot files (freespace2/data/players: .plr & .csg) I'll see if there's an easy fix I can make to get them working again.
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: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
IIRC there's been a few more red-alert bugfixes in trunk since Yarn created his exec.  If you post your pilot files (freespace2/data/players: .plr & .csg) I'll see if there's an easy fix I can make to get them working again.
I have been updating my builds occasionally, actually. Right now, as shown in the original post, the builds are based on revision 9689, which is essentially 3.7.0 RC2. I will add a date there so it's more obvious how up to date the builds are.
"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: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
ah sorry, should have checked the OP...
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: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
Quote from: niffiwan
If you post your pilot files (freespace2/data/players: .plr & .csg) I'll see if there's an easy fix I can make to get them working again.

I'd appreciate that. I haven't even seen the end of the game yet. >_< I wasn't sure which file, since there are some in the directory and in the "single" folder, so I just 7zed the whole directory. It's attached.

Quote from: Yarn
I know the campaign is long, but could you try playing through it again with the most recent nightly build, without my patch? I very strongly doubt that my patch is really causing the crash.

That.... would take a while. I've already played it through twice in a row. Oh well, I really enjoy it, so I'll give it a try. It's possible the bug was already fixed though. God I hope so. Well, I'm sorry for cluttering your thread. Should I take this discussion somewhere else?

[attachment deleted by ninja]
« Last Edit: June 09, 2013, 02:52:02 am by MaJoRoesch »

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
I've given your pilot a test with the latest trunk code and it worked fine, the last mission loaded & you've got 3x Alpha, 1x Beta & 1x Gamma wingmen remaining.  If you re-download & use Yarn's exec from the OP (it now includes a patch for the problem you encountered) I think you should be able to complete the campaign without needing to restart.
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: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
Yep, that fixed it indeed. And I was finally able to see the end. Holy crap.

Anyway Yarn, sorry to bother you about this stuff. Delete the posts if you'd like. Thanks for the help, and the patience in mucking up your thread.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
I read through all three pages, but I didn't find a concrete answer: Can I use only the tbl file you provided and not the patch and get the same effect of an adaptable hud?

 

Offline Yarn

  • 210
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
I read through all three pages, but I didn't find a concrete answer: Can I use only the tbl file you provided and not the patch and get the same effect of an adaptable hud?
No. Those tables require a feature that only my patch provides. Furthermore, they're not meant to enable anything; they're only for reference (i.e., for modders to use as a base for their own HUDs).
"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 wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
I read through all three pages, but I didn't find a concrete answer: Can I use only the tbl file you provided and not the patch and get the same effect of an adaptable hud?
No. Those tables require a feature that only my patch provides. Furthermore, they're not meant to enable anything; they're only for reference (i.e., for modders to use as a base for their own HUDs).

Gotcha, and I am constructing a custom hud, so I thought maybe I could only use the tbl file, but it is still definitely helpful. And just to double check I put the actual patch file in the table file correct?

 

Offline Yarn

  • 210
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
Gotcha, and I am constructing a custom hud, so I thought maybe I could only use the tbl file, but it is still definitely helpful. And just to double check I put the actual patch file in the table file correct?
No. The patch won't work if it's placed in a TBL/TBM file. Rather, it's supposed to be applied to the game's source code, which must then be compiled. Instructions on how to do this in Windows are here. If you use another operating system, then unfortunately I can't help you compile.

And if you are running Windows, then there's really no need to mess with the patch or compile. The original post has Windows builds that, as of now, are basically 3.7.0 RC2 with the patch applied.
"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 wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
No. The patch won't work if it's placed in a TBL/TBM file. Rather, it's supposed to be applied to the game's source code, which must then be compiled. Instructions on how to do this in Windows are here. If you use another operating system, then unfortunately I can't help you compile.

And if you are running Windows, then there's really no need to mess with the patch or compile. The original post has Windows builds that, as of now, are basically 3.7.0 RC2 with the patch applied.

Got it I do have windows luckily. I think I will still try and learn how to do the compiling since it seems like a useful thing to know. Thanks again for all the help. Sorry if these seemed like simple questions.
« Last Edit: July 01, 2013, 07:33:49 pm by wookieejedi »

 

Offline Kodachi

  • 24
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
Another question about the pilot files: The HUD build seems to create a multipayer pilot as well after creating a single player pilot. Why?

Also, my old "inferno" pilots are empty on the HUD build.

It would be nice if someone could enlighten me a bit about this whole pilot thing. Although I have already read plenty of stuff, I don't quite seem to understand. Currently all I know is I prefer how 3.6.18 handles pilots.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
A quick rundown:

3.6.18:

Pilotfiles are in data/players/single/inferno (for inferno builds, but lets not widen the rabbit-hole)
Main file is .plr2
There's one campaign file per campaign you played, .cs2
Multiplayer pilots are completely separate to single player pilots

3.6.19 & higher:

Pilotfiles are in data/players
Main file is .plr
There's one campaign file per campaign you played, .csg
New format is more robust/fault tolerant than the old format (and should handle redalerts better, they were notoriously unreliable in 3.6.18 & prior)
New format is much easier to extend / add new things to than the old format (e.g. new key controls)
Single player pilots are now used for multiplayer as well
The old format files are converted to new format files if new files with the same name don't already exist (i.e. usually only happens once unless you delete your .plr & .csg files)
We're still fixing some bugs with the new pilot code (mostly minor stuff I think)

edit: fix some errors
« Last Edit: August 17, 2013, 03:34:34 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 Kodachi

  • 24
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
Thanks allot niffiwan, that really helped!

 

Offline Yarn

  • 210
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
I updated the builds again to incorporate recent fixes to the pilot conversion code.
"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 Kiloku

  • 27
  • Buzzbuzz!
    • Minecraft
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
Is it possible to apply the patch to the game without making a new build? I don't know how .patch files work...
If not, is this available in a post-3.7.0 build, such as one of the Nightlies?
Potato!

 

Offline Yarn

  • 210
Re: Adaptable HUD, a.k.a. No more HUD stretching, for real this time (with patch!)
Is it possible to apply the patch to the game without making a new build? I don't know how .patch files work...
No. Patch files must be applied to source code. If you are running Windows and wish to learn how to use patch files and compile, instructions are found here.

Note that I do have links to Windows builds in the original post. If you think it's time for them to be updated, let me know.

If not, is this available in a post-3.7.0 build, such as one of the Nightlies?
Not right now, and it won't be unless the SCP team decides to commit it. If it does get committed, either I or an SCP member will eventually say so.
"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