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

0 Members and 3 Guests are viewing this topic.

Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Thanks for the advice. I really appreciate it. I'll try the compatibility patch and the nightly build and see if it works. Thanks for the suggestion. I just got into this (I owned retail Freespace 2 when it first came out) and I am just amazed at what this team of people have out together given the age of the original engine.

Thanks again

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Actually, Yarn's HUD patches should be in the most recent BP build as well.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Actually, Yarn's HUD patches should be in the most recent BP build as well.

Looks like they are not.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Actually, Yarn's HUD patches should be in the most recent BP build as well.

Looks like they are not.
D'oh, for some reason I thought the last BP build was rev 10280, but that's the build Diaspora 1.1 is using.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Yeah. The compatibility patch worked for Blue Planet 1....at the cost of some of the lighting effects. It doesn't work on Blue Planet 2 because I think they use their own hud tables because of the cockpit views that it uses (This is my first real experience with working with any modded software so I hope any of that made sense.)

Thanks for the suggestions.


 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Hi all

Is there a mod or a way to get a widescreen mainhall image?

 

Offline niffiwan

  • 211
  • Eluder Class
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Unfortunately not, implementing support for that is still on the coding TODO list.
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 mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
I always meant to toy with some animorphic trickery... but I didn't want to re-render everything.
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.

 

Offline Kolgena

  • 211
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Couldn't you just take the current already-rendered images, vert-minus (or letterbox) them and stretch/compress them in such a way so that when the 4:3->16:9 conversion happens, you get proper aspect ratio? Your pixel aspect ratio will be off by a lot, but that doesn't matter as much.

You'd also have to redraw/reposition the animations, so maybe not.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Well, I could crop the current 4:3 mainhalls, but you'd lose a lot of the scene that was designed to be visible. (AKA: either the barrels, or Barracks Door in Galatea... or both)

But then yes.. I'd have to figure out the width compression ratio and apply that to all the animations as well. Then I'd have to re-position them all again. It'd be complicated and who knows if it would really be worth it. I honestly don't mind them being stretched to 16:10.. the worst part of it is that the people look like midgets. (Depending on how you view the FS universe, that could be what the people are actually like, too! :p )
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: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Well, I could crop the current 4:3 mainhalls, but you'd lose a lot of the scene that was designed to be visible. (AKA: either the barrels, or Barracks Door in Galatea... or both)

But then yes.. I'd have to figure out the width compression ratio and apply that to all the animations as well. Then I'd have to re-position them all again. It'd be complicated and who knows if it would really be worth it. I honestly don't mind them being stretched to 16:10.. the worst part of it is that the people look like midgets. (Depending on how you view the FS universe, that could be what the people are actually like, too! :p )

It is way better not to crop, but to add margins to left | right to fix aspect ratio by compressing background horizontally. Anyway it definetly will require alot of calculations to place all the elements (however it could be done by excel or something similar). And calcualtion will be different for 16:10 or 16:9. Hell.

But content compatibility-wise it would be nice to solve it by overhauling rendering. But...
May be it doable to switch resolution between 1024X768 and 1920x1080 (for example) when launching a mission ?


 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
It would be simpler to just render the retail interface with black borders or stretched to fit vertically.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
It would be simpler to just render the retail interface with black borders or stretched to fit vertically.

That's exactly what I meant. Perfect solution. Render the retail interface with black horizontal  borders , stretched to fit vertically.
 :yes:
Volunteers? :)

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
+1 for black borders left and right for menus. Or maybe just fill those spaces with Freespace themed art. You know, like Duke Nukem 3d on Xbox 360. It might not be the ideal longtime solution, but it's still million times better than the current stretched menu.

Speaking of widescreens, could someone respond to my topic regarding the in-game field of view? Thanks in advance  :)

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
(however it could be done by excel or something similar). And calcualtion will be different for 16:10 or 16:9. Hell.

Not easily and nope. If the system works as it works now, and if everything was setup correctly the coords would not need to be different for different ratios. Otherwise the current mainhalls would be stretched with inaccurate coords already.


It would be simpler to just render the retail interface with black borders or stretched to fit vertically.

Honestly, I'd rather have stretching than vertical bars... but that's just me.
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: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time

Honestly, I'd rather have stretching than vertical bars... but that's just me.

Are you sure? Take a look on illustration:

http://www.hard-light.net/forums/index.php?topic=86617.0

If there are people in scene, it looks even worse streched.
And remember nice BP wallpapers, streched circles to ovals  :nono:

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Yes I'm sure.
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.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
There is no reason why this can't be implemented in a way that can be controlled by the user.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline asic139

  • 21
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
So as a multimonitor user I've been looking for some time for a working hud_gauges.tbl to move the hud elements to the center screen.  There's a position based table posted a few pages back but it has a few flaws, most notably the missile lock circle is erratic and getting a lock is significantly more difficult.   The gauge positions also aren't correct.  So I used the origin-offset stock table file in the first post and altered it for multimonitor use.

It was a lot more simple than I thought it would be.  So kudos to the dev for it.  Two simple replace commands is all it took   "(0.0" -> "(0.333"   and "(1.0" -> "(0.666"  Also I changed the base res to 1920,1080.  I found using 5760,1080 caused the erratic missile lock circle.   Lower resolutions can be used to scale the UI.

EDIT:  I spoke too soon about the missile lock.  It's still an issue.   The indicator's movement is very exaggerated horizontally.  It makes lock difficult.  Flying a bomber is almost impossible due to the slow lock time of the heavy weapons.  Is there anyway to compensate for this?  I can upload a video if that helps.






Code: [Select]
#Gauge Config
 $Base: (1920, 1080)
 $Min: (1024, 600)
 $Gauges:
  +Messages:
   Origin: (0.333, 0.0)
   Offset: (8, 5)
  +Training Messages:
   Origin: (0.5, 0.5)
   Offset: (-133, -259)
  +Support:
   Origin: (0.5, 0.5)
   Offset: (-53, 150)
  +Damage:
   Origin: (0.5, 0.0)
   Offset: (-72, 61)
  +Wingman Status:
   Origin: (0.666, 0.0)
   Offset: (-92, 144)
  +Auto Speed:
   Origin: (0.666, 1.0)
   Offset: (-64, -96)
  +Auto Target:
   Origin: (0.666, 1.0)
   Offset: (-64, -120)
  +Countermeasures:
   Origin: (0.666, 1.0)
   Offset: (-144, -166)
  +Talking Head:
   Origin: (0.333, 0.0)
   Offset: (5, 56)
  +Directives:
   Origin: (0.333, 0.5)
   Offset: (5, -106)
  +Weapons:
   Origin: (0.666, 1.0)
   Offset: (-144, -257)
  +Objective Notify:
   Origin: (0.5, 0.5)
   Offset: (-76, -200)
  +Squad Message:
   Origin: (0.666, 0.0)
   Offset: (-197, 5)
  +Lag:
   Origin: (0.5, 0.5)
   Offset: (115, 145)
  +Mini Target Shields:
   Origin: (0.5, 0.5)
   Offset: (-15, 86)
  +Player Shields:
   Origin: (0.5, 1.0)
   Offset: (112, -98)
  +Target Shields:
   Origin: (0.5, 1.0)
   Offset: (-220, -98)
  +Escort View:
   Origin: (0.666, 0.5)
   Offset: (-159, -54)
  +Mission Time:
   Origin: (0.666, 1.0)
   Offset: (-55, -52)
  +Target Monitor:
   Origin: (0.333, 1.0)
   Offset: (5, -178)
  +Extra Target Data:
   Origin: (0.333, 1.0)
   Offset: (5, -216)
  +Radar:
   Origin: (0.5, 1.0)
   Offset: (-101, -178)
  +Afterburner Energy:
   Origin: (0.5, 0.5)
   Offset: (-238, 40)
  +Weapon Energy:
   Origin: (0.5, 0.5)
   Offset: (154, 40)
  +Text Warnings:
   Origin: (0.5, 0.5)
   Offset: (0, -109)
  +Center Reticle:
   Origin: (0.5, 0.5)
   Offset: (-19, -14)
  +Throttle:
   Origin: (0.5, 0.5)
   Offset: (-166, -115)
  +Threat Indicator:
   Origin: (0.5, 0.5)
   Offset: (62, -115)
  +Lead Indicator:
  +Lock Indicator:
  +Multiplayer Messages:
   Origin: (0.333, 0.5)
   Offset: (8, -144)
  +Voice Status:
   Origin: (0.333, 0.5)
   Offset: (8, -129)
  +Ping:
   Origin: (0.666, 0.0)
   Offset: (-128, 5)
  +Supernova:
   Origin: (0.5, 0.5)
   Offset: (-342, -214)
  +Offscreen Indicator:
  +Target Brackets:
  +Orientation Tee:
   Origin: (0.5, 0.5)
   Offset: (0, 3)
  +Hostile Triangle:
   Origin: (0.5, 0.5)
   Offset: (0, 3)
  +Target Triangle:
   Origin: (0.5, 0.5)
   Offset: (0, 3)
  +Missile Triangles:
   Origin: (0.5, 0.5)
   Offset: (0, 3)
  +Kills:
   Origin: (0.666, 1.0)
   Offset: (-144, -144)
  +Fixed Messages:
  +ETS Retail:
   Origin: (0.666, 1.0)
   Offset: (-144, -120)
 $End Gauges
#End
« Last Edit: August 06, 2014, 11:55:52 am by asic139 »

 

Offline niffiwan

  • 211
  • Eluder Class
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
EDIT:  I spoke too soon about the missile lock.  It's still an issue.   The indicator's movement is very exaggerated horizontally.  It makes lock difficult.  Flying a bomber is almost impossible due to the slow lock time of the heavy weapons.  Is there anyway to compensate for this?  I can upload a video if that helps.

It sounds like the lock gauge movement scaling needs some work.  A video would help, i.e. to see exactly when & what the erratic movement is, when locking, when losing a lock, etc.
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...