ZScript Status bar scaling issues

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

ZScript Status bar scaling issues

Post by Major Cooke »

worldendDominator wrote:Here you go: https://imgur.com/a/WgVbd
Resolutions are 1280x1024, 1280x960, and 1600x900.
So there's this issue with D4D (original post) where scaling is a bit broken. All I tried to do is port half of the status bars over and it's sticking out over the edges on some of these resolutions.

I did whatever I could to just outright mirror the old sbarinfo where possible without getting carried away with extra features.

After discussing this with ZZYZX, he and I believe this is a potential bug.

This is stuff that's part of HUD_StatusBar state. The fullscreen stuff hasn't been ported yet.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Status bar scaling issues

Post by Graf Zahl »

Like always: Provide a SMIPLE and CONTAINED example WAD. Do I have to repeat every time that D4D is too big for debugging unrelated things?
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: ZScript Status bar scaling issues

Post by Major Cooke »

Okay, I didn't double check my post and completely forgot to mention I was actually working on one.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: ZScript Status bar scaling issues

Post by Major Cooke »

Here you go. Simply load the game and choose the 1280 x 1024 resolution.

(Cursed 256kb file limit... The damn file is only 278kb, sheesh.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Status bar scaling issues

Post by Graf Zahl »

It looks like you are drawing outside the virtual screen that's being used for the status bar. Of course that will get cut off on anything narrower than 16:10.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: ZScript Status bar scaling issues

Post by Major Cooke »

I have no idea what I should do to properly fix this though. Some suggested I use fullscreenoffsets, but will that work there without clobbering everything? Or am I going to have to do something more drastic?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Status bar scaling issues

Post by Graf Zahl »

You have to test the layout on 4:3 (i.e. everything needs to say within (0, 0, max-x, max-y) or if you absolutely need to have a 16:9 layout check the actual ratio and use different layouts. But if you create a 16:9 layout that goes beyond the edges of the virtual screen it won't work properly on 4:3.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: ZScript Status bar scaling issues

Post by Nash »

Is it not possible to retrieve the absolute screen left/right/top/bottom? In Unreal, those are called anchors.

That way, it doesn't matter what aspect ratio the user uses.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: ZScript Status bar scaling issues

Post by Major Cooke »

That would be a godsend.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Status bar scaling issues

Post by Graf Zahl »

Nash wrote:Is it not possible to retrieve the absolute screen left/right/top/bottom? In Unreal, those are called anchors.

That way, it doesn't matter what aspect ratio the user uses.
The entire system is aspect ratio independent. But if you draw outside of the virtual screen's coordinates you may also draw outside of the screen if the scaling factor is high enough.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: ZScript Status bar scaling issues

Post by Major Cooke »

Is there a function to detect whether we're in certain aspect ratios or do I just have to manually detect that myself? I've, uh... never really done it manually before I admit so not sure what to do there.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: ZScript Status bar scaling issues

Post by _mental_ »

There is Screen.GetAspectRatio() function.
Post Reply

Return to “Closed Bugs [GZDoom]”