Author Topic: aspect ratio correction  (Read 13014 times)

Offline mewse

  • Sergeant
  • **
  • Posts: 10
    • View Profile
aspect ratio correction
« on: July 29, 2010, 07:34:13 pm »
this is some pretty terrible code that adds a new parameter to the setScale method of the Screen class. it uses some hardcoded values so is probably not suitable for trunk

for reference: https://doom.wikia.com/wiki/Aspect_ratio

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: aspect ratio correction
« Reply #1 on: July 29, 2010, 08:10:20 pm »
Can you give screenshots from before & after?

Offline mewse

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: aspect ratio correction
« Reply #2 on: July 29, 2010, 08:55:57 pm »
Simple 2x scale:

2x scale, aspect corrected:

Simple 2x scale:

2x scale, aspect corrected:

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: aspect ratio correction
« Reply #3 on: July 29, 2010, 09:47:21 pm »
Maybe it's only me, but i think that without aspect correction, it looks better.

IMHO with aspect correction text looks worse, and also earth looks too oval.

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: aspect ratio correction
« Reply #4 on: July 29, 2010, 10:02:57 pm »
@michal:

It will on a physically square screen. The idea behind it is you run a 4:3 (Square) resolution on a 16:9 (Widescreen) display. You vertically stretch it in software so the hardware horizontal stretch cancels out, leaving you the correct display.

In fact, my windows mobile is 400x240 (in landscape), so I'd need edge cropping code to maintain the square image on that.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: aspect ratio correction
« Reply #5 on: July 30, 2010, 06:48:00 am »
Fancy aspect ratio talk aside, all you did was resize the screen to 640x480, which well fair enough, you can scale it however you want, I just never implemented it because it's an 8bpp game so any kind of decimal resize will not be smoothed and probably look like ass, but if some people like it, I'll throw it in at some point.

And I'm not sure X-Com was designed for 4:3 anyways since the PSX version is 640x480 and it just letterboxes the 640x400 graphics.

Offline luciderous

  • Colonel
  • ****
  • Posts: 108
  • There is no spoon...
    • View Profile
Re: aspect ratio correction
« Reply #6 on: July 30, 2010, 08:21:31 am »
X-Com has a native resolution of 320x200, which is effectively 8:5 aspect ratio. Thus if you apply any (dosbox, or handmade) aspect "correction" - if will look squeezed. Personally, I see no point in doing this, unless you intend to rewrite the correction mechanism with this peculiarity in mind 8)

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: aspect ratio correction
« Reply #7 on: July 30, 2010, 09:02:19 am »
Yeah, integer scaling, and black borders to fill any remaining space  ;D

Offline mewse

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: aspect ratio correction
« Reply #8 on: July 31, 2010, 08:57:03 pm »
And I'm not sure X-Com was designed for 4:3 anyways

All DOS games of this era did 320x200 on a 4:3 monitor, so each pixel was 1 unit wide and 1.2 units tall. If the Amiga version was different, I don't know, but the psx port came later