Jump to content
The Dark Mod Forums

Subtitles - Possibilities Beyond 2.11


Geep

Recommended Posts

Sadly, I'm not optimistic about ever seeing subtitle accommodations based on HUD preferences, or on user choices.

Given all the dust that's been kicked in my face for wanting just auto-selected two-width subtitle boxes, even as a user option.

 

  • Like 1
Link to comment
Share on other sites

On 1/9/2024 at 8:16 PM, Geep said:

Sadly, I'm not optimistic about ever seeing subtitle accommodations based on HUD preferences [...]

It isn't that difficult, but it looks a little ugly code-wise.

In the latest version from @stgatilov found in this post just replace:

#define SUBTITLE_BASE_Y (379 - 52 * SUBTITLE_IDX)

with:

EDIT - Removed because it was wrong. Check this post.

Mind you! this again is a quick hack with no guarantees. Code must be properly assessed if we go for it.

Edited by snatcher
Wrong code
  • Like 1

TDM Modpack 4.0

Link to comment
Share on other sites

It is not perfect, but it can be.

The downsides are:

  • New dependency with a different gui. If [tdm_inv.gui] changes in certain areas [tdm_subtitles_message.gui] should change accordingly.
  • Players with a huge lightgem and/or "acquire" text might sometimes get subs above the middle of the screen. I say these players should expect that to happen and wouldn't worry about it.

TDM Modpack 4.0

Link to comment
Share on other sites

1 hour ago, snatcher said:

It isn't that difficult

Not technically, no.

snatcher, maybe it's soon time for a subtitle Modpack to offer some of the design alternatives.

  • Like 1
Link to comment
Share on other sites

I just want you guys to happily keep working on this project, delivering subtitles 🙂

@stgatilov has incorporated many changes already in his version. If we do something else that feels right, he might evaluate further changes.

@Geep, do you feel comfortable on getting the dynamic positioning right? I am sure you do.

TDM Modpack 4.0

Link to comment
Share on other sites

9 minutes ago, snatcher said:

do you feel comfortable on getting the dynamic positioning right?

I am willing to take a look at it, but not before sometime next week. Working on the last vocal set, for the Cynic, first.

  • Like 1
Link to comment
Share on other sites

It looks like sooner or later we'll have to add settings menu for subtitles.

Verbosity can be moved to it.
Then there can be this big switch between background and outlined text.
And a bunch of color settings for various elements.

The only thing I wish to not see there is any settings which can affect text layout 😥

Link to comment
Share on other sites

18 hours ago, datiswous said:

is there a way to reload subtitles without restarting tdm?

Dunno. I always assumed not. So for my testSubtitles... FMs, I adopted a QA workflow to make corrections in large batches, so the restart was needed less often.

  • Like 2
Link to comment
Share on other sites

On 1/9/2024 at 11:19 PM, Geep said:

I am willing to take a look at it, but not before sometime next week [...]

I made wrong assumptions in the previous attempt and I would say this is the right SUBTITLE_BASE_Y we want in [tdm_subtitles_message.gui]:

#define SUBTITLE_BASE_Y (379 - (20*("gui::bigTextSize"-1) + 32*("gui::lightgemSize"-1) + 14*("gui::lightgemSize"*"gui::barSize"-1)) - 52*SUBTITLE_IDX)

 

Some tests and examples for small HUD, default HUD, large HUD. The green rectangle is where the "acquired" messages are displayed. Subtitles are dynamically position right above them.

dyn-sub-pos.jpg

 

I couldn't get all three blocks to show up at the same time but almost:

dyn-sub-pos2.jpg

This little change is good to go, imho.

  • Like 1

TDM Modpack 4.0

Link to comment
Share on other sites

@Geep Regarding 0.24 vs 0.25 font scale.

I think there was purpose, though I can't say now which exactly.
Maybe it was to ensure that all the text fits, maybe it was to make vertical padding symmetric.

Anyway, why do you think 0.24 and 0.25 differ?
I did not look in the code yet, but I think what engine does is 1) choose most suitable image, 2) render quad texture with it.

Indeed, we can avoid some blurring if the pixel size of the quad exactly matches the image size.
But I guess the engine counts font size in 640x480 virtual resolution. So even if the font size would be "12", it would later be stretched over whatever width you really have (if your aspect ratio is 16:9 then height would be stretched equally, but otherwise it would be stretched with different factor).

  • Like 1
Link to comment
Share on other sites

@stgatilov, I likewise think that the chosen source image would be the same for 0.24 and 025. In the case of Stone, that would the 24pt (corresponding to 0.50 textscale), since no 12pt source image is available. And agree that scale factors of 0.24 and 0.25 should render character sizes slightly differently. As long as it was purposeful, even at the potential cost of minor blur, that's fine. As you imply, such blur may be unavoidable anyway, since the otherwise-desirable aspect compression would also inflict it.

Just need to think of the 0.24 scale results as 11.5 point size instead of 12.

  • Like 1
Link to comment
Share on other sites

On 1/12/2024 at 1:51 PM, snatcher said:

this is the right SUBTITLE_BASE_Y we want in [tdm_subtitles_message.gui]:

#define SUBTITLE_BASE_Y (379 - (20*("gui::bigTextSize"-1) + 32*("gui::lightgemSize"-1) + 14*("gui::lightgemSize"*"gui::barSize"-1)) - 52*SUBTITLE_IDX)

 

This is based on the tdm_subtitles_message.gui given in the stgatilov's post you referenced, and also identically in 2.12 beta 3.

I have reviewed this as you requested. I can't speak to the accuracy of the green bars in your screenshots, but the calculation seems correct. It derives from the calculation in mainmenu_settings_guisize.gui (of beta3), which finds the top edge of the bounding box of the Inventory Pickup Message (e.g., "Acquired 80 in Jewels"), then reduces that to account for the subtitle backing field height of 37, plus a 4 pixel gap between the lowest subtitle field and the pickup message.

I also confirmed that the beta3 calculation of the top edge of Inventory PickupMessage is identical in both mainmenu_settings_guisize.gui and tdm_inv.gui; the latter is part of the HUD during game play.

  • Like 2
Link to comment
Share on other sites

As designed, this should avoid overlap of the subtitles with the resizable central HUD elements: health bar, light gem, breathe bar, pickup message. It would not avoid all potential overlaps with the resizable corner elements.

Link to comment
Share on other sites

2 hours ago, Geep said:

[...] I can't speak to the accuracy of the green bars in your screenshots [...]

I just added (in-game) a background color to the rectangle of the "Acquired" message for better reference.

1 hour ago, Geep said:

[...] It would not avoid all potential overlaps with the resizable corner elements.

I think you better let it be 🙈

Some players might make the light-gem a little smaller or larger and these players have been serviced. Players with tiny or huge HUD elements are on their own (and they know it!)

TDM Modpack 4.0

Link to comment
Share on other sites

19 hours ago, snatcher said:

Some players might make the light-gem a little smaller or larger and these players have been serviced.

True. Regarding this dynamic design, it could be argued that we should ignore the Acquired field (Inventory Pickup Message), since messages there are shown rarely, and not at all if the user turns it off. Instead, place the low subtitle slot just above the breath bar. Then all the subtitles slots would be lower. However, this would increase overlap with the corners, unless some mitigation was done. That could be done engine-side, if the slot-fill priority was changed to, e.g., middle-slot first, low-slot last. So the conflict-prone low-slot becomes rarely used.

Other mitigating ideas -

- move the Acquired field to the top, right under the Objectives Message field

- do away with the Acquired field, and instead deliver its message using the subtitle mechanism (possibly with color markup or a different font than regular subtitles). This would require an engine enhancement, to generate a subtitle given a runtime-assembled string, without any sound file.

Link to comment
Share on other sites

7 hours ago, datiswous said:

For gui's there is reloadGuis and for xdata there's reloadXData.

@stgatilov could something like this be added for subtitles as well? Or does it already exist?

I did something for it.

I think it should be reloadDecls...
Rather logical since subtitles are decl files.
 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 1 reply
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...