Aspect ratio fixes, please test

Help test release candidates for the next release
Post Reply
User avatar
Z-Man
God & Project Admin
Posts: 11369
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Aspect ratio fixes, please test

Post by Z-Man »

Please check out 0.2.9.1_alpha_z2286 and make one modification to your configuration: Either remove CONSOLE_COLUMNS from your users.cfg or enter
CONSOLE_COLUMNS 0
at the console. That's the new default.

The changes are mostly for users of ultrawide screens, but also apply to regular widescreen. That's why I need feedback, I suppose most of you will have a 16:9 or 16:10 screen.

What has changed? It starts off with most of Nelg's aspect ratio fixes from +ap; all the text output (except for the splitscreen setup preview) now has the same character aspect ratio it would have on a 4:3 screen. Previously, most texts were stretched with the screen width.

The second item on the aspect ratio fixlist is the HUD; previously, it would also be stretched to the full screen width without increasing in height. Now, it keeps the aspect ratio it was designed with and only grows to the side (and to the top proportionally) until it is HUD_MAX_WIDTH times the screen height wide (or fills the screen width, whatever comes first). HUD_MAX_WIDTH = 0 restores the old behavior if you're nostalgic for that. Sensible regular values for HUD_MAX_WIDTH are between 1.0 and 2.0.
I originally only wanted to implement this for 0.4, but we already had the HUD drawn in a special viewport to make it not get extra squished in splitscreen mode, and I just had to modify how that is created.
The new setting also applies to splitscreen mode and has the welcome effect that on a horizontal split, the HUD no longer occupies half of each player's screen, while in side-by-side splitscreen, it fills the available space.

The last change is the default console output; previously, we had CONSOLE_COLUMNS 78, which fit 78 characters on one console line. That is too few for full HD screens already, and for ultrawide, characters get comically large. So I added two new magic values, CONSOLE_COLUMNS = 0 and -1. -1 will always take the big font and make it so that it is drawn on the screen unscaled, pixel by pixel. Look at it:
pixelconsole.png
It's beatiful. It's perfect. It's...
Hang on.
Are the capital letters and numbers one pixel too high?
.....
They are.

Good that we noticed that in time. So the font needed correction, too. While at it, I also lowered the period/decimal point. Was putting it up that high a bold artistic choice I desecrated? I hope not.

Anyway, the default CONSOLE_COLUMNS = 0 does that, too, but does not make the characters any smaller than 1/47th of the screen height. Number chosen because that's what the pixel perfect mapping gets for screens 1440 pixels high, which rarely are high DPI, so the text is unlikely to get too small. Also, on the smallest PC screen I have available, the 11 inch netbook, I can juuust about read text with 47 rows. I'd obviously rather make it depend on the display's actual DPI value, but we don't get any of that in SDL 1.2, and it's just the default. Users of the crazy 7 inch fully featured notebook can use CONSOLE_COLUMNS 60.

And while making font rendering pixel perfect, I also made it so that if you scale the font down as low as it goes, it uses the small font and always in a pixel perfect way. I doubt that's going to be useful to anyone, as that's definitely too small to be comfortably readable, and any work on fonts in 0.2.9 is long-term wasted anyway. But it had to be done. Also, the space between letters of the small font is now increased. That means there is now space between the letters.

Old:
screenshot_1.png
screenshot_2.png
screenshot_3.png
New:
screenshot_199.png
screenshot_200.png
screenshot_203.png
Feedback desired. I can't trust my own eyes here; I happily worked in the 80x50 text mode back in the DOS days. I'm practically blind to text stretching.

You can get the old console and HUD behavior back with
CONSOLE_COLUMNS 78
HUD_MAX_WIDTH 0
The old general font aspect ratio currently has no option to return it to the 0.2.8 ways. It could have several. Go back to the old behavior, or declare what we did for 16:9 screens the standard for even wider screens.
You do not have the required permissions to view the files attached to this post.

User avatar
aP|Nelg
Match Winner
Posts: 586
Joined: Wed Oct 22, 2014 10:22 pm
Contact:

Re: Aspect ratio fixes, please test

Post by aP|Nelg »

Hmm, what happened to the server browser? Here's +ap for comparison
Screenshot from 2020-08-26 17-18-17.png
Well, okay, I'll admit, it does look a little strange having everything that far apart in 21:9, however 16:9
Screenshot from 2020-08-26 17-19-14.png
does look fine to me, and comparable to 0.4. Well, fine other than the tooltip being rather close to the bottom and the missing(/thin) line from the bottom of g.

Either way, I am glad to see proper aspect ratio correction in mainline 0.2, as well as the pixel difference between capital / lowercase letters. The massive difference in appearance between small and large font ("System" and OCR-A fonts respectively, it would appear) does still bother me a little.
You do not have the required permissions to view the files attached to this post.

User avatar
Z-Man
God & Project Admin
Posts: 11369
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Aspect ratio fixes, please test

Post by Z-Man »

aP|Nelg wrote:
Wed Aug 26, 2020 10:27 pm
Hmm, what happened to the server browser? Here's +ap for comparison
Well, for one, you have the nicer font :) What makes my screensots extra ugly is that I picked a low resolution and the small font gets selected here. The same happens on earlier versions with screen height 720:
screenshot_4.png
Direct comparison to how that resolution looks now:
screenshot_3.png
The change between the two is that the characters of the small font got narrower. That's the extra pixel between characters that makes them not blend together in their tiniest size. Whether that is a good thing is up for debate! Even without that change, the tiniest size is still readable.
Compared to that 4:3 screenshot, the other aspect ratios are identical, just with more space to the side:
screenshot_1.png
screenshot_2.png
The difference to AP where you decided to give the server name more space, whereas I just put empty space around the list, was accidental. Your changes didn't merge cleanly, so I manually took over what I could. I hadn't even started any AP client :) But thinking about that choice now, I like the accident better, because if you add the space in the middle,
a) it's really hard to connect the stats on the right with the servers on the left without hovering the selection over the spot you're interested in. The slanted grid lines in the background are not helpful.
b) server admins might get the idea they can fill the space. Then 4:3 screen users, or even just 16:10, might get inferior results. I'm not categorically opposed to allowing longer server names, but it should happen in a controlled fashion.

Was there another difference I missed? Text in my version being upside down?
aP|Nelg wrote:
Wed Aug 26, 2020 10:27 pm
The massive difference in appearance between small and large font ("System" and OCR-A fonts respectively, it would appear) does still bother me a little.
Yeah, the small font is so totally different because in the early days, we needed to fully support software rendering and 320x200 screen resolutions. Readability under those conditions, while still putting lots of text on the screen, was more important than consistency.

What we could experiment with now is to move the switchover threshold to the small font. It's rather high, way before the big font becomes unreadable or even ugly. It's in the settings! FONT_BIG_THRESHOLD_WIDTH and FONT_BIG_THRESHOLD_HEIGHT.
You do not have the required permissions to view the files attached to this post.

User avatar
sinewav
Graphic Artist
Posts: 6300
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: Aspect ratio fixes, please test

Post by sinewav »

Tested on Linux Mint 20 with no problems. Looks like I can finally play in full screen! I always play windowed in 4:3 specifically because of the text rendering. Thanks for this.

Will you add these changes to 0.4 and does that fix the cockpit scaling issues?

User avatar
aP|Nelg
Match Winner
Posts: 586
Joined: Wed Oct 22, 2014 10:22 pm
Contact:

Re: Aspect ratio fixes, please test

Post by aP|Nelg »

sinewav wrote:
Sat Aug 29, 2020 10:44 pm
Will you add these changes to 0.4 and does that fix the cockpit scaling issues?
Mm, at least some of the changes here will make it into 0.4 next merge from 0.2.9; however I should note that 0.4 already has displayed text correctly independent of the aspect ratio. I'm sure this will help when working on cockpit scaling issues, but this isn't directly tied to that.

Post Reply