Improve FPS counter positioning

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

Moderator: GZDoom Developers

User avatar
Jekyll Grim Payne
 
 
Posts: 1071
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Improve FPS counter positioning

Post by Jekyll Grim Payne »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Improve FPS counter positioning

Post by Graf Zahl »

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
Jekyll Grim Payne
 
 
Posts: 1071
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Improve FPS counter positioning

Post by Jekyll Grim Payne »

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
3saster
Posts: 199
Joined: Fri May 11, 2018 2:39 pm
Location: Canada

Re: Improve FPS counter positioning

Post by 3saster »

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).
Post Reply

Return to “Feature Suggestions [GZDoom]”