ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.69k stars 1.99k forks source link

Add High DPI (4K) Menu's and Subtitles #530

Open Michael-Z-Freeman opened 2 years ago

Michael-Z-Freeman commented 2 years ago

Source SDK 2013 mods all scale the in game HUD elements well to 4K (I refer to latest beta version). The exception is subtitles/messages although that can be fixed by altering the correct ".res" file to show a larger font size. For example see - https://developer.valvesoftware.com/wiki/Modifying_Source_GameUI - I have confirmed by testing it that fonts can in fact be increased in size to be visible on my 4K display. The settings menu does not scale to 4K but could also be fixed although this is a bigger job. It uses VGUI - https://developer.valvesoftware.com/wiki/VGUI_Documentation - There are even "high_def" switches in the resource files to allow different sizes for different displays. I experimented with modding this myself but its quite a big job for someone not familiar with VGUI as an entire menu layout needs adding for 4K (3840x2160). But its obviously possible. So I don't understand why Valve have not updated their SDK to be fully visible on 4K/High DPI displays by default (default settings menu and subtitle sizes). Half Life 2 mods look really good in 4K but I suspect most people don't stay with it for very long because the player cannot see Keyboard controls to change or other settings if they try and go into the menu in 4K. It just becomes a massive inconvenience so I usually end up dropping down to 1920x1080. So it would be nice if the SDK were updated for modern displays.

schm1dtxbox commented 2 years ago

The solution should probably be to stop using any non-proportional fonts or UI elements in code, that way the UI would ideally not need to be adapted for a million different resolutions. The hidef stuff you refer to was only for the Xbox 360 version of TOB in order to support 720p and 480p simultaneously with correctly sized UI elements for each res, without having to switch everything to be proportional. I would think that Valve intends to replace the current menu system for PC HL2/EP1/EP2 at some point though with the fancy new gamepad UI that is used by the Steam Deck by default(or with the -gamepadui launch option elsewhere), which automatically scales the UI correctly at different resolutions.

Michael-Z-Freeman commented 2 years ago

The solution should probably be to stop using any non-proportional fonts or UI elements in code, that way the UI would ideally not need to be adapted for a million different resolutions. The hidef stuff you refer to was only for the Xbox 360 version of TOB in order to support 720p and 480p simultaneously with correctly sized UI elements for each res, without having to switch everything to be proportional. I would think that Valve intends to replace the current menu system for PC HL2/EP1/EP2 at some point though with the fancy new gamepad UI that is used by the Steam Deck by default(or with the -gamepadui launch option elsewhere), which automatically scales the UI correctly at different resolutions.

Yes I just checked and the beta has the new UI and it is 4K ready !

https://www.gamingonlinux.com/2022/01/half-life-2-getting-a-new-ui-in-prep-for-steam-deck/

You have to use "-gamepadui" as a launch option.

It's a beta so I had to fiddle around a little to get it working in 4K. Changing the resolution leads to an update problem with the new UI which is fixed by restarting.

Here's a nice comparison between old and new - https://www.pcgamesn.com/steam-deck/half-life-2-ui-updat

Half-Life 2_2022 01 30-15 52 Half-Life 2_2022 01 30-15 52_1 Half-Life 2_2022 01 30-15 53 Half-Life 2_2022 01 30-15 53_1 e

AL2009man commented 2 years ago

Seems like Left 4 Dead 2 and Portal 2 also added "-gamepadui" function, the effects aren't as drastic as HL2's.

with Left 4 Dead 2, it only affects the HUD:

Before: 20220201154038_1

After: 20220201154350_1

with Portal 2: only the Button Prompts and the Loading Screen UI gets B I G G E R. unknown unknown

the rest remains the same.

SirYodaJedi commented 1 year ago

Mentioning #540 to link the issues.