Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Limit window-resizing to diagonal when "force aspect ratio" is on #809

Open
dftf-stu opened this issue Jan 6, 2022 · 6 comments

Comments

@dftf-stu
Copy link

dftf-stu commented Jan 6, 2022

Background

Version of Crispy Doom: 5.10.3
Operating System: Windows 10 Version 21H2 (x64; non-ARM)
Game: DOOM
Any loaded WADs and mods: N/A

Feature suggestion

Observed behaviour:

When "force aspect ratio" is enabled, it remains possible to resize the Crispy DOOM window in all-directions, but this makes little-sense, as you just end up with empty space above and below, or to the left-and-right, of the game:

CrispyDOOMWindowResizeAllDirections

Suggested behaviour:

I would suggest that when "force aspect ratio" is enabled, window-resizing should be limited to diagonally only, as this would always respect the aspect-ratio, and avoid any blank areas.

(Many games-console emulators operate in this way when "preserve aspect ratio" or "allow square pixels only" or similar are enabled)

@dftf-stu
Copy link
Author

dftf-stu commented Jan 6, 2022

Also, on a similar note: maybe add a setting to lock the window resizing to only sizes that would perfectly-scale DOOM's original resolution, to ensure all pixels are doubled, but never stretched?

Most emulators work in this way -- Game Boy ones, for example, usually offer a window scale option, measured in how many times bigger you want the image compared to the original resolution. So "2x" would be "twice as big" (a 1x1 pixel becomes a 2x2 square of pixels) and "3x" would be "three times as big" (a 1x1 original pixel now becomes a 3x3 square of pixels).

It would be nice to have a setting that would lock window-resizing to only sizes that perfectly-size DOOM's original resolution, for example:
1x  320 x 200
2x  640 x 400
3x  960 x 600
4x 1280 x 800
5x 1600 x 1000
6x 1920 x 1200

@fabiangreffrath
Copy link
Owner

Also, on a similar note: maybe add a setting to lock the window resizing to only sizes that would perfectly-scale DOOM's original resolution, to ensure all pixels are doubled, but never stretched?

This feature is already available, but it's hidden in the config file. It's called "integer_scaling".

@fabiangreffrath
Copy link
Owner

fabiangreffrath commented Jan 11, 2022

This feature is already available, but it's hidden in the config file. It's called "integer_scaling".

Does this option fix it for you?

@dftf-stu
Copy link
Author

@fabiangreffrath I have tried setting that option to 1, inside the "crispy-doom.cfg" file, but no, it doesn't seem to do what I mean.

As far as I know, DOOM's original resolution was 320x200 (I think there might have been a 320x240 mode also, but I can't recall if this was available in the original MS-DOS release, or only came-about in the DOOM95 launcher?). With the option on, then the window-resizing should be locked to only sizes where the pixels can be perfectly scaled.

So if the game were to launch in windowed mode, with the default 320x200 resolution inside it, then when I drag to resize it, the next size it should snap to would be 640x400, as that means every one pixel now becomes two on both axis, resulting in a perfectly crisp image. The next size would be 960x600. On my 1366x768 display, that would be the largest window-size I would be allowed to go up to, as 1280x800 would mean some of the bottom of the window would not fit on my display.

Likewise, in full-screen mode, it should default to the largest size available with no cut-off, so again 960x600 for my display, with the image centred on the screen.

So either this option doesn't do what it should, or maybe it does something different but not what I'm asking for here?

Essentially, I'm suggesting a "only allow larger resolutions that are perfect scales of DOOM's original resolution" setting.

@dftf-stu
Copy link
Author

@fabiangreffrath Though I do note that when I go into the "Crispness" menu, and go to "Widescreen Aspect Ratio", the default value is "4:3", which would mean Crispy is assuming 320x240 as the base-resolution. But for 320x200, the "16:10" value would actually be the correct default aspect...

Which resolution does Crispy do it's scalling from?

@fabiangreffrath
Copy link
Owner

As long as you have aspect_ratio_correction enabled, Crispy will stretch the resolution vertically from 200 px to 240 px or 400 px to 480 px, respectively. If you want integer multiples of 200 px or 400 px, you will need to disable aspect_ratio_correction, but please keep in mind that this is not how Doom was supposed to look:
https://doomwiki.org/wiki/Aspect_ratio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants