Author Topic: Unstretched Interface discussion  (Read 12954 times)

0 Members and 1 Guest are viewing this topic.

Offline Ace

  • Truth of Babel
  • 212
    • http://www.lordofrigel.com
Re: Unstretched Interface discussion
That patterned border mockup looked very nice. As long as mods can do custom ones I'd prefer to see that as a default.
Ace
Self-plagiarism is style.
-Alfred Hitchcock

 

Offline Belisarius

  • 27
  • I will not give up my ship!
    • Minecraft
    • Steam
    • Legends of Middleearth
Re: Unstretched Interface discussion
I don't care at all if it's default or not. What I care for is the readability of recommendation texts, that usually come in red and are barely readable anymore. Not sure if it's build related or not though, but this glitch is new to me. The font is so heavily blurred that people with slight viewing discrepancies really get in trouble to read the affected texts.

 

Offline Yarn

  • 210
Re: Unstretched Interface discussion
I've noticed one other problem with this.
I wanted to do screen shots with the menus streched and not stretched.  I had put the -stretch_menu custom command line in.
I'm not sure if this is a launcher problem or a problem with the build but the command line does not appear in the custom command line in the WXlauncher and I can't modify or remove it.  It appears to be treated as if it is an option that can be selected.  This could be a problem for custom mods if people want to switch back and forth between stretched and non stretched.
WxLauncher only saves what flags were entered, not how they were entered. In the case of -stretch_menu, you can toggle it just like most of the other flags; it's called "Stretch interface to fill screen" and is found in the Gameplay section.

Also, I couldn't get the [settings] stuff to work at all. For example, I tried inserting the following in the mod.ini file of the 2014 MediaVPs, and no matter what launcher I used (I tried Launcher 5.5g and wxLauncher), I didn't get ship models in the ship-select screen. (And yes, I did select the MediaVPs directly, not a mod that used them.)
Code: [Select]
[settings]
flags = -ship_choice_3d;


Oh, and I'm almost ready to release a patch that, among other things, includes features to address some of Mjn's concerns, including a way to define more than two (or even just one) resolutions for main halls, as well as a zoom feature that allows a single main hall entry to support a range of aspect ratios without black bars or stretching. (The latter feature is a bit more sophisticated than "zoom in until main hall fills screen completely," and it doesn't do anything unless the modder chooses to utilize it.) I just have to write some documentation first and maybe fix up a few things.


EDIT: Forgot to reply to this:
I don't care at all if it's default or not. What I care for is the readability of recommendation texts, that usually come in red and are barely readable anymore. Not sure if it's build related or not though, but this glitch is new to me. The font is so heavily blurred that people with slight viewing discrepancies really get in trouble to read the affected texts.
Can you provide a screenshot showing the problem? (And please provide it as PNG, not JPG.)
« Last Edit: April 06, 2014, 02:25:12 am 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

 

Offline m!m

  • 211
Re: Unstretched Interface discussion
Just so you know, there is already a library out there that can handle parsing of quite a few 3D formats, including DAE: https://github.com/assimp/assimp

EDIT: Sorry wrong thread...
« Last Edit: April 07, 2014, 06:38:02 am by m!m »

 

Offline Belisarius

  • 27
  • I will not give up my ship!
    • Minecraft
    • Steam
    • Legends of Middleearth
Re: Unstretched Interface discussion
EDIT: Forgot to reply to this:
I don't care at all if it's default or not. What I care for is the readability of recommendation texts, that usually come in red and are barely readable anymore. Not sure if it's build related or not though, but this glitch is new to me. The font is so heavily blurred that people with slight viewing discrepancies really get in trouble to read the affected texts.
Can you provide a screenshot showing the problem? (And please provide it as PNG, not JPG.)


It seems that it's everything but a bug or strange feature concerning the builds, but a problem with my new 42" flatscreen that I use as monitor. When I look at this image on my 22" monitors (got two of them) it looks just fine, the red words are readable just fine. Sorry if I panicked the wrong people. Will have to find out what the reason for this is myself.

 

Offline Yarn

  • 210
Re: Unstretched Interface discussion
Just so you know, there is already a library out there that can handle parsing of quite a few 3D formats, including DAE: https://github.com/assimp/assimp
Uh, I think you meant to post that in this thread. We're not discussing 3D models 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

 

Offline swashmebuckle

  • 210
  • Das Lied von der Turd
    • The Perfect Band
Re: Unstretched Interface discussion

The skinny FotG font is pretty indistinct over that grey background.  I could definitely see that being a problem on some monitors.  The red might also cause problems for red-green color blind people as it looks pretty faint.

 

Offline Yarn

  • 210
Re: Unstretched Interface discussion
OK, the patch is finally ready. With it, you can define any number of resolutions for main halls, as well as when and how each resolution is displayed. Here it is:
https://dl.dropboxusercontent.com/u/89353583/FreeSpace/Patches/main_hall_enhancement.patch

And here is a build, based on revision 10842:
https://dl.dropboxusercontent.com/u/89353583/FreeSpace/Patches/main_hall_enhancement_build.zip


I have also made a mod (here) that includes two simple main halls for testing this feature, each with its own campaign file:
https://dl.dropboxusercontent.com/u/89353583/FreeSpace/main_hall_test.zip

Details are in the campaign descriptions.



Now, on to the documentation. This feature adds some additional parameters to mainhall.tbl. Below is a sample table showing each of these parameters, with the new ones marked. More details on these are provided below the table.

Code: [Select]
;file-wide parameter
$Num Resolutions: 1  ;*new*


;main halls start here

$Main Hall
+Name: mymainhall

+Min Resolution: 1024 768  ;*new*
+Min Aspect Ratio: 1.2  ;*new*

+Bitmap: whatever  ;pretend that the resolution of this bitmap is 1920x1080, although any resolution is valid
+Mask: whatever-m
+Music: something
+Substitute Music: something-else

+Help Overlay: anything
+Help Overlay Resolution Index: 2 ;*new*

+Zoom To: 1440 1080  ;*new*


;sounds and animations go here


+Font: 2  ;*new*

+Tooltip Padding: 7  ;*new*
+Tooltip Y: 1065  ;not new, but see note


;more main halls go here


#end


(All of the parameters below are optional unless otherwise noted.)

$Num Resolutions:

Defines the number of resolutions of each main hall in this file. Other main-hall tables are not affected, so you can have, say, two resolutions in mainhall.tbl and three in extrahalls-hall.tbm without messing up the former table.

If there are multiple resolutions, the game will pick the last one that is valid for the screen resolution and aspect ratio. If none are valid, or only one resolution exists, then the first one is used. This is done per main hall, not globally.

The default value is 2.


+Min Resolution:

Defines the minimum valid resolution for this main-hall configuration. Has no effect if this configuration is for the first resolution.

The default value is 0 0 for the first resolution and 1024 600 for subsequent resolutions.


+Min Aspect Ratio:

Defines the narrowest valid aspect ratio for this main-hall configuration. The argument is a single floating-point number that is the quotient of width / height. Has no effect if this configuration is for the first resolution.

Because of possible rounding errors, avoid setting this to a value that exactly matches a common aspect ratio (e.g., 1.6 for 16:10). Instead, set it to a slightly lower value (e.g., 1.59).

The default value is 0.0.


+Help Overlay Resolution Index:

Sets which overlay resolution to use. (With this patch, help.tbl entries are no longer limited to just two resolutions; they can now have just one, three, or more. See the end of this post for details.)

The default value is 0 for the first main-hall resolution, 1 for the second, 2 for the third, and so on.


+Zoom To:

If set, tells the game to zoom in to this area of the main hall, cropping off the edges if necessary. This parameter allows you to make a single main-hall configuration that supports a range of aspect ratios without black bars or stretching.

In the example table above, the background bitmap is 1920x1080, but the zoom area is 1440x1080 (a 4:3 resolution). In this instance, if the screen aspect ratio is narrower than 16:9 but not narrower than 4:3, then the sides are cropped off so that the screen can be filled. If the aspect ratio is narrower than 4:3, then the main hall is still cropped to the 4:3 area, leaving black bars if -stretch_menu is not set. The reverse is also possible; the background could be 1280x960 with the zoom area being 1280x720. One of the main halls in the example mod even combines these examples!

If you do use this parameter, then make sure that all of the doors (or buttons) are inside the zoom area. If you don't, then they may go offscreen, making them impossible to click!


+Font:

Defines the font used for the text in this main hall. The number here points to a font entry in fonts.tbl, with 0 pointing to the first one. Does not affect pop-up messages or the F1 overlay.

The default value is 0 (normally font01.vf).


+Tooltip Padding:

Defines how much the shading area should extend above the tooltips. Also affects the "Press F1 for help" text at the top.

This was previously hardcoded as two values, one for each resolution: 4 for 640x480 and 7 for 1024x768. These are still used as the default values.


+Tooltip Y:

EDIT: This parameter is no longer required in my patch. If it's omitted, then the game will place tooltips at the bottom of the visible main-hall area.

This parameter isn't new; in fact, it's been required since retail, and it still is. However, because main halls can now use resolutions other than 640x480 and 1024x768, and because perhaps only two people other than Volition employees have even looked at it, it deserves attention. The value here tells the game where to place the tooltips, which appear when you hover your mouse over a door. This value works like the Y values of the animations, meaning the tooltips are actually placed on a specific part of the main hall, not a certain number of pixels from the bottom of the screen! Because of this, you may need to adjust this to suit your main hall's resolution. To get a good value for this parameter, I suggest using the following formula:

height - ((height - zh) / 2) - fh - 4

...where:

height = the height of the main hall
zh = the height of the zoom area; if no zoom area is defined, then use the main hall's height instead
fh = the height of the font (9 for font01, 18 for font02, and 11 for font03)



Help.tbl/*-hlp.tbm has also been extended to support more than two resolutions. Two new optional parameters have been added, both of which belong at the beginning of a section, just after the section name. Here they are:


+resolutions

Defines the number of resolutions in this overlay. May be 1 or greater.

If this is set to anything other than 2, then all other parameters in this overlay that normally take two sets of values must now have a set of values for each resolution. For example, if an overlay has four resolutions, then any bracket parameter must have four pairs of values instead of two.

The default value is 2.


+font

Defines the font used for the text in this overlay. The number here points to a font entry in fonts.tbl, with 0 pointing to the first one. Takes one value for each resolution.

The default value for each resolution is 0 (normally font01.vf).



Oh, and this patch allows preload screens to be any resolution and aspect ratio, not just 640x480 and 1024x768. However, the two-resolution limit is still there, and the resolutions are chosen in the same manner as before, with 1024x600 being the minimum for the higher resolution.
« Last Edit: June 26, 2014, 12:03:44 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

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Unstretched Interface discussion
I would love to test this. Any chance you could provide builds?
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 Shivan Hunter

  • 210
  • FRED needs lambdas!
Re: Unstretched Interface discussion

The skinny FotG font is pretty indistinct over that grey background.  I could definitely see that being a problem on some monitors.  The red might also cause problems for red-green color blind people as it looks pretty faint.

No idea what your monitor does, Belisarius, but some video compression algorithms have serious problems with red, and make it very blurry. Youtube's compression is an example. (although the text there doesn't play well with the bright background, but that's more an interface issue than a FSO issue)

 

Offline Yarn

  • 210
Re: Unstretched Interface discussion
I would love to test this. Any chance you could provide builds?
A link to some builds has been added to my previous post.
"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 mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Unstretched Interface discussion
Finally tested this out. This is very, very good. The premise is great. I toyed around a bit with my assets and things work as I would expect. One question, your MainHallTest2-hall.tbm does not define mainhalls for 640x480 or 1024x768. How is the code handling that? Is it actually scaling the graphics to fit into the lower resolutions?

The ability to define a 16:9 mainhall that can also be used for full screen setups is brilliant. This patch gets my vote.

Tooltip Y: don't care what you do.. makes no difference from a design perspective to me.

Help.tbl stuff.. do people use help overlay? :p I realize it needs to be considered.. so whatever works best there.

What are the next steps to get this in? (Obviously post 3.7.2, which is sad.)
« Last Edit: May 12, 2014, 08:54:07 pm by mjn.mixael »
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 Yarn

  • 210
Re: Unstretched Interface discussion
One question, your MainHallTest2-hall.tbm does not define mainhalls for 640x480 or 1024x768. How is the code handling that? Is it actually scaling the graphics to fit into the lower resolutions?
If a main hall has only one resolution, then the game uses that for every resolution, scaling down if necessary. (I'll add this to the documentation.)

Tooltip Y: don't care what you do.. makes no difference from a design perspective to me.
In that case, I'll go ahead with my proposed change.
"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 The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Unstretched Interface discussion
I think we can make an exception and put it into 3.7.2. Given that I have no idea how long it's going to be until the next stable release, putting people in a situation where they can't use trunk for released (or soon to be released) campaigns is something I want to avoid.
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 chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Unstretched Interface discussion
With the new automated release stuff, I'm kind of just waiting for people to say 'go' and I can have a release out shortly, assuming all the computers are behaving that day.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Yarn

  • 210
Re: Unstretched Interface discussion
I updated the patch and build to make +Tooltip Y optional and to fix an assertion that I forgot to change. I also removed the +Tooltip Y line in MainHallTest2-hall.tbm.
"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 mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Unstretched Interface discussion
Looks good to me. What's left on this.. possible help.tbl stuff?
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 mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Unstretched Interface discussion
*Tap* *Tap* *Tap* Hellooooooooo? Is this thing on?

RC2 is out and nothing further has been discussed or finished on this.
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 Yarn

  • 210
Re: Unstretched Interface discussion
The only thing left to do is add support for more than two resolutions in help.tbl. Before I try that, though, I'm waiting for my help.tbl patch in Mantis 2812 to be committed. I'm waiting because if I make a patch for this feature now, then it would almost certainly conflict with the Mantis 2812 patch.
"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: Unstretched Interface discussion
I'll do my best to review & commit mantis2812 by the end of this weekend...

Edit: I've reviewed the code, run some tests, and it all looks good. There's just one thing to be resolved and that is that the patch needs updating to apply cleanly to the latest trunk.  Could you do that, I'll have a final look, and then I'll commit it.

Edit2: The fix for mantis2812 has been committed in r10739.
« Last Edit: May 31, 2014, 07:56:59 pm 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...