Option to change aspect ratio of menu background images

Moderator: GZDoom Developers

Malice
Posts: 19
Joined: Mon Feb 04, 2019 3:54 am

Option to change aspect ratio of menu background images

Post by Malice »

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.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Option to change aspect ratio of menu background images

Post by Rachael »

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

Re: Option to change aspect ratio of menu background images

Post by Graf Zahl »

More like some really old assumptions about it is supposed to behave.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Marisa the Magician »

Now what are these assumptions you're talking about? How much of this is hardcoded to 4:3?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Option to change aspect ratio of menu background images

Post by Graf Zahl »

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
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Marisa the Magician »

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
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Nash »

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
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Option to change aspect ratio of menu background images

Post by Rachael »

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 12:23 pm, edited 1 time in total.
Reason: clarified
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Option to change aspect ratio of menu background images

Post by Enjay »

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
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Marisa the Magician »

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

Vanilla (forced 4:3)

Stretch

Fit

Fill
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Option to change aspect ratio of menu background images

Post by Enjay »

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
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Nash »

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

Re: Option to change aspect ratio of menu background images

Post by Graf Zahl »

No, they'll get black bars at the top and bottom.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Nash »

Sounds good enough to me! That's how it works too in other software, as I recall seeing in the past.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Option to change aspect ratio of menu background images

Post by Marisa the Magician »

Yes, that's exactly it.
Locked

Return to “Closed Feature Suggestions [GZDoom]”