opengldirectxrendering

Full screen rendering on widescreen monitors


My situation is as follows. I make games that use fixed size backgrounds (say 800x600). When players go fullscreen in a widescreen monitor, I add black bars to the sides, to make sure the game doesn't look stretched.

There are several ways to do this, though, and I wonder what's the best approach :

1) Find a resolution that closely matches the native aspect ratio of the monitor, and scale up the rendered image to fit the height. For example, my monitor is 1280x800, so I set that resolution, and scale the images by 1.33 - it takes 1066x800 but it looks fine. Drawbacks : scaling up, but scaling is uniform (so pixels are still square)

2) Set 800x600 fullscreen, scaling down the width by 0.625, so the rendered image looks not-stretched. Drawbacks : non-uniform scaling. Does this look good?

3) Something else

What do you think is the best way to do this?


Solution

  • I would suggest your option 1 also. Specifically, you want to leave the display resolution in the native monitor resolution if at all possible. Most people are using LCD displays these days, and if the output resolution doesn't match the native display resolution (or isn't a very convenient multiple) then you can get some horrible artefacts and blurring. So definitely start with the native resolution, figure out the lesser dimension (likely height, as widescreen is all the rage) and pillbox the sides. You definitely want to keep square pixels. You might even find (depending on the size ratio between your game assets and the output) that you get better results if you round the scaling down.