Option to change aspect ratio of menu background images

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

Moderator: GZDoom Developers

Option to change aspect ratio of menu background images

Postby Malice » Mon Jul 08, 2019 9:51 pm

Despite 16:9 aspect ratio monitors dominating current market share, why does GZDOOM still force 4:3 menu images on the start screen/intermissions, etc?

Even when the game aspect ratio is forced to 16:9 in the video settings this still remains.

Even if you manually insert a 16:9 image into a WAD GZDOOM still scales it down to 4:3.

Why not give the option to the user to set it how they want?

Seems rather ridiculous/outdated and I'm not the only one looking for this feature after searching to find a solution to the problem.
Malice
Banned User
 
Joined: 04 Feb 2019

Re: Option to change aspect ratio of menu background images

Postby Rachael » Mon Jul 08, 2019 10:56 pm

I'm betting the reason this hasn't been done already might be because there's some really old code holding it back.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Option to change aspect ratio of menu background images

Postby Graf Zahl » Tue Jul 09, 2019 1:05 am

More like some really old assumptions about it is supposed to behave.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Option to change aspect ratio of menu background images

Postby Marisa Kirisame » Wed Jul 10, 2019 8:34 am

Now what are these assumptions you're talking about? How much of this is hardcoded to 4:3?
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Option to change aspect ratio of menu background images

Postby Graf Zahl » Wed Jul 10, 2019 8:36 am

The assumption is that every image being passed to the fullscreen drawer is 4:3 and needs to be fit into a 4:3 area. And this assumption is extremely old, it was one of those early sloppy things that has been haunting ZDoom for 20 years.

The fact that the original screen size was 320x200 stretched to 4:3 doesn't make this any easier because there's images in 640x400 that are 4:3 and also images in 640x480 that are 4:3 and who knows what else.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Option to change aspect ratio of menu background images

Postby Marisa Kirisame » Wed Jul 10, 2019 8:51 am

Oh this is the worst...

Edit: I'm thinking I could add some gameinfo setting to make titlepic/interpic/etc. draw scaled to fit or fill.

Edit 2: So far my initial work is having some desirable results. A gameinfo setting named pageScale is introduced with 4 options: "vanilla", "stretch", "fit" and "fill". Vanilla is obviously the default and it has the old behaviour. Currently it's all done for the title screen, although I have to do some polishing and put most of its bulk into a separate function so it can also be called from intermissions without duplicating code.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Option to change aspect ratio of menu background images

Postby Nash » Wed Jul 10, 2019 10:29 am

Marisa Kirisame wrote:Oh this is the worst...

Edit: I'm thinking I could add some gameinfo setting to make titlepic/interpic/etc. draw scaled to fit or fill.

Edit 2: So far my initial work is having some desirable results. A gameinfo setting named pageScale is introduced with 4 options: "vanilla", "stretch", "fit" and "fill". Vanilla is obviously the default and it has the old behaviour. Currently it's all done for the title screen, although I have to do some polishing and put most of its bulk into a separate function so it can also be called from intermissions without duplicating code.


Care to post images of what stretch, fit and fill look like?
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Option to change aspect ratio of menu background images

Postby Rachael » Wed Jul 10, 2019 10:32 am

Fit shrinks the image, without distortion, until it entirely fits inside the window, creating black bars.

Stretch takes the image, no matter its aspect ratio, and makes it fill every corner of the screen, causing distortion, but you can still see every corner of it.

Fill just enlarges the image until it fills the screen, causing you to lose the corners, but does not distort the image.
Last edited by Rachael on Wed Jul 10, 2019 1:23 pm, edited 1 time in total.
Reason: clarified
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Option to change aspect ratio of menu background images

Postby Enjay » Wed Jul 10, 2019 12:42 pm

Ohhh, I'm looking forward to see what will come of this.

I assume that it will cope with 5:4 and other weird ratios too? (In fact, my own set up is 16:10 which, IMO, is a much better ratio than the far more common 16:9.)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Option to change aspect ratio of menu background images

Postby Marisa Kirisame » Wed Jul 10, 2019 1:00 pm

This is an example with a 16:9 background on a 16:10 window.

Vanilla (forced 4:3)

Stretch

Fit

Fill
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Option to change aspect ratio of menu background images

Postby Enjay » Wed Jul 10, 2019 1:08 pm

Looks good, very good.

So, just to make sure that I understand the terms "fill" and "fit"...

Fit takes the largest dimension of the image and fits that to the screen (I assume width or height), adding black bars, if necessary, to the other dimension.

Fill makes the image fill the screen by adjusting proportionally it until the dimension that would have black bars with "fit" matches the screen size and if the other dimension is now bigger than the screen dimensions, the extra bits just "fall off" the screen and are unseen. Is that correct?
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Option to change aspect ratio of menu background images

Postby Nash » Wed Jul 10, 2019 1:25 pm

Marisa Kirisame wrote:This is an example with a 16:9 background on a 16:10 window.

Vanilla (forced 4:3)

Stretch

Fit

Fill


Enjay wrote:Looks good, very good.

So, just to make sure that I understand the terms "fill" and "fit"...

Fit takes the largest dimension of the image and fits that to the screen (I assume width or height), adding black bars, if necessary, to the other dimension.

Fill makes the image fill the screen by adjusting proportionally it until the dimension that would have black bars with "fit" matches the screen size and if the other dimension is now bigger than the screen dimensions, the extra bits just "fall off" the screen and are unseen. Is that correct?




Very nice. Yeah, this is long overdue.

What happens when a 4:3 user loads a mod that has a widescreen image? Do the extra pixels at the side get cut off (so the image is basically centered)?
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Option to change aspect ratio of menu background images

Postby Graf Zahl » Wed Jul 10, 2019 1:33 pm

No, they'll get black bars at the top and bottom.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Option to change aspect ratio of menu background images

Postby Nash » Wed Jul 10, 2019 1:38 pm

Sounds good enough to me! That's how it works too in other software, as I recall seeing in the past.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Option to change aspect ratio of menu background images

Postby Marisa Kirisame » Wed Jul 10, 2019 2:37 pm

Yes, that's exactly it.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
Graphics Processor: nVidia with Vulkan support

Next

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest