Improve FPS counter positioning

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Improve FPS counter positioning

Postby Jekyll Grim Payne » Sun Dec 12, 2021 4:45 am

The other day I started to think I was losing my mind when I was drawing two identical images in the corners of the screen, yet the top-right one kept being offset downward. Then I finally realized it was the FPS counter.


The FPS counter seems to arbitrarily move HUD elements downward if they're using DI_SCREEN_RIGHT_TOP flag to avoid being drawn on top of them (and that's even in cases when they wouldn't be drawn on top of it due to offsets).

To have a debug-like feature potentially break the visual identity of HUD is very weird. I think the following things need to change:

1. Completely disable moving HUD elements due to the FPS counter. If anything should be moved, it should, naturally, be the FPS counter itself.

The rest are stretch goals, so to say:

2. Allow disabling black background below the counter.
3. Allow moving the FPS counter on the screen (ideally, everywhere, but just choosing a specific counter would be OK).
4. Allow changing the color of the FPS counter font.

The latter 3 would allow the player to make sure the counter is visible even if drawn on top of the HUD.
User avatar
Jekyll Grim Payne
 
 
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Improve FPS counter positioning

Postby Graf Zahl » Sun Dec 12, 2021 5:38 am

The elements are moved because Doom's fullscreen HUD places its tiny keys there and were overlapped by the FPS counter. So users requested to add an auto-adjustment for when the counter is active.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Improve FPS counter positioning

Postby Jekyll Grim Payne » Sun Dec 12, 2021 7:40 am

Graf Zahl wrote:The elements are moved because Doom's fullscreen HUD places its tiny keys there and were overlapped by the FPS counter. So users requested to add an auto-adjustment for when the counter is active.


I understand the logic, but this doesn't solve or invalidate the issues I've outlined, in my opinion. If anything should move, it's the debug FPS counter, not the HUD elements.
User avatar
Jekyll Grim Payne
 
 
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Improve FPS counter positioning

Postby 3saster » Mon Dec 13, 2021 6:43 pm

The auto-adjustment should still be improved though, all it does is move the elements down ten pixels. If the HUD scale is large enough, it can still block it, and if it's small enough, it leaves a large gap (in the nature of what Ash is experiencing). It should at least take the HUD scaling into account, as it does here.

Graf Zahl wrote:The elements are moved because Doom's fullscreen HUD places its tiny keys there and were overlapped by the FPS counter. So users requested to add an auto-adjustment for when the counter is active.

The more logical solution then would be to recode the fullscreen HUD itself to offset its keys if vid_fps is on, not to move every single element placed in that corner. If a mod author really wants to account for that, they can always check the vid_fps CVAR directly and adjust accordingly, since I highly doubt that CVAR is going anywhere anytime soon. If that is bad practice, then imo that would be a reason to expose a variable to ZScript that says if it is on or not (or perhaps even better, a variable that shows how much screen estate the display is taking up).
User avatar
3saster
 
Joined: 11 May 2018
Location: Canada


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests