Playing at 320x200

Talk about the mods or features you'd like to see in Daggerfall Unity. Give mod creators some ideas!
User avatar
MaxiM
Posts: 41
Joined: Tue Jun 11, 2019 10:16 pm

Re: Playing at 320x200

Post by MaxiM » Wed Jun 12, 2019 6:31 am

Interkarma wrote:
Wed Jun 12, 2019 2:54 am
OK, changed this setting to "RetroRenderingMode" which has options 0=off, 1=320x200, 2=640x400.
Yesss! Thank you. This makes my pixel-loving senses tingling :D
Now for the shading thing, but I will start a new thread about it, as I could not find any mention of it.
“The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.”

~ George Bernard Shaw

User avatar
King of Worms
Posts: 2180
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Playing at 320x200

Post by King of Worms » Wed Jun 12, 2019 8:42 am

Perfect, and another reason to praise my Samsung SyncMaster 2493HM... it was the 1st LCD Ive ever bought after the CRT era.. and guess what :D Not a single faulty pixel after all those years of using it. And that sweet 16:10 aspect ratio... which will come oh so handy with a retro mode. Thank you :)

User avatar
MaxiM
Posts: 41
Joined: Tue Jun 11, 2019 10:16 pm

Re: Playing at 320x200

Post by MaxiM » Thu Jun 13, 2019 1:41 pm

Oh, one more thing @Interkarma:

Not to be that needy/nitpicky guy, but do you think you could add one more checkbox to all this? Aspect ratio correction (4:3) ON/OFF is what I mean.

Tried playing the original DOS game in DOSBox without aspect correction and it doesn't work all that well. All 320x200 games worth their salt were prepared for 4:3 screens by creating assets that are a bit squished, so they look correct once proper aspect ratio kicks in. DF in uncorrected 320x200 looks a bit... well, < w i d e > :P

With the switch, the 16:10 monitor users who don't mind living in double-gravity Tamriel would be satisfied, along with people who prefer square boxes ;)
“The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.”

~ George Bernard Shaw

User avatar
Interkarma
Posts: 4833
Joined: Sun Mar 22, 2015 1:51 am

Re: Playing at 320x200

Post by Interkarma » Thu Jun 13, 2019 9:35 pm

I'll see what I can do later. There's a good article here that MrFlibble provided last year that helped me understand the issue better.

User avatar
MaxiM
Posts: 41
Joined: Tue Jun 11, 2019 10:16 pm

Re: Playing at 320x200

Post by MaxiM » Thu Jun 13, 2019 10:06 pm

That is a pretty neat article - bookmarked. And yes, that is exactly what I'm talking about :)
“The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.”

~ George Bernard Shaw

User avatar
Interkarma
Posts: 4833
Joined: Sun Mar 22, 2015 1:51 am

Re: Playing at 320x200

Post by Interkarma » Thu Jun 13, 2019 10:28 pm

Something you could try in the next release is to enable 320x200 retro mode and set your game resolution to 1600x1200 mode. Then the game is rendering at 16:10 and presenting at perfectly 5x/6x scaled 4:3. I just tried this on my end (UHD monitor so plenty of real-estate) and it actually looks decent.

320x200-at-1600x1200.png
320x200-at-1600x1200.png (961.62 KiB) Viewed 257 times
The UI layer still needs some work though, so its far from a full solution. This is one of those problems that has a lot of compromises depending on target display and can never be quite perfect.

User avatar
MaxiM
Posts: 41
Joined: Tue Jun 11, 2019 10:16 pm

Re: Playing at 320x200

Post by MaxiM » Thu Jun 13, 2019 11:45 pm

Oh, I thought 16:10 will be forced in retro mode - it it will stretch to target resolution then it should be mostly fine. That screenie is breath taking - or would be, if it wasn't for that pesky anti-aliasing (but I would still take it over HD any day) ;)
“The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.”

~ George Bernard Shaw

User avatar
Interkarma
Posts: 4833
Joined: Sun Mar 22, 2015 1:51 am

Re: Playing at 320x200

Post by Interkarma » Fri Jun 14, 2019 12:09 am

Glad you like it! :) This effect comes from that split between rendering and presentation stages again. Just to explain for everyone why this works.

Mode 13h was a really popular VGA display mode back in the day, with a 320x200 16:10 resolution target. But the most common monitors were all 4:3 aspect for presentation, so the target render ended up being displayed 20% higher in output signal. As you already know, game developers worked around this by manually drawing the art a bit squishy so it came out OK on the target hardware. Great then, but not so fun to deal with on modern hardware.

Previously DFU was both rendering and presenting at the set display resolution. Now with retro rendering enabled, its rendering into a true 320x200 or 640x400 resolution target then presenting to whatever your set game resolution is. As a final step, this is then scaled to your desktop resolution with aspect correction resulting in letterbox/pillarbox bars.

The reason 1600x1200 works so well is that it's a 4:3 aspect that's exactly 5x wider and 6x higher than 320x200, so a 16:10 render is being presented as 4:3, which is essentially reproducing the intended display conditions.

A 5x width and 6x height multiplier is so important because 6 is precisely 20% more than 5. As 5 is a prime number that yields a perfect integer at 20%, there aren't many resolutions that will provide this same effect so exactly. There is no smaller resolution than 1600x1200 than can provide the exact same shape at presentation time with a perfect 20% increase to height.

It took me a while to really grok all of this. :(

User avatar
MaxiM
Posts: 41
Joined: Tue Jun 11, 2019 10:16 pm

Re: Playing at 320x200

Post by MaxiM » Sat Jun 15, 2019 12:15 am

Interkarma wrote:
Fri Jun 14, 2019 12:09 am
The reason 1600x1200 works so well is that it's a 4:3 aspect that's exactly 5x wider and 6x higher than 320x200, so a 16:10 render is being presented as 4:3, which is essentially reproducing the intended display conditions.
Damn, I knew I should have bought 1920 x 1200 monitor instead of 1080p :(
“The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.”

~ George Bernard Shaw

Post Reply