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_Thumb.png

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_Thumb.png

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_Thumb.png

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_Thumb.png

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_Thumb.png

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

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 0 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...