game image sizes and screen resolution

Member
Posts: 90
Joined: 2006.11
Post: #1
When writing a full screen computer game, it is not a bad idea to accommodate for multiple screen resolutions for different monitors. I have thought about these two approaches:

1. All the image sizes are the same whatever resolution the player might give us.
Pros:
Don't need to scale

Cons:
If monitor really big, images look really small, and converse true for small monitors too.

2. Images are scaled so they look like the same size no matter what the screen resolution maybe.
Pros:
Images look same real length (in terms of cm) whatever resolution maybe

Cons:
Need to accommodate wide-screens.
Scaling may potentially take up processor time.

Noting that I am talking about fullscreen game, is there a "the best approach" or does it depend on the game?

How do you guys see this?
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #2
leRiCl Wrote:2. Images are scaled so they look like the same size no matter what the screen resolution maybe.
Pros:
Images look same real length (in terms of cm) whatever resolution maybe

Cons:
Need to accommodate wide-screens.
Scaling may potentially take up processor time

- "Need to accommodate wide-screens."

Answer: Use a fixed aspect ratio by automatically letter/pillar-boxing your viewport as needed.

- "Scaling may potentially take up processor time"

Answer: Not if you're using OpenGL.

The only drawback to scaling images is that sometimes things don't look absolutely one hundred percent pixel-perfect in every single situation. But overall, it's the best trade-off for most cases IMHO.
Quote this message in a reply
Member
Posts: 90
Joined: 2006.11
Post: #3
AnotherJake Wrote:- "Need to accommodate wide-screens."

Answer: Use a fixed aspect ratio by automatically letter/pillar-boxing your viewport as needed.
But that means screen space is wasted!
I guess its either this or that, though.

On another note:
Warcraft 3 doesn't pillar-box on my Macbook, even if I choose resolution 800 x 600! How did they do that? When I use SDL_SetVideoMode it pillar boxes when I specify with 800x 600 resolution, how do I remove the pillarboxing?

AnotherJake Wrote:- "Scaling may potentially take up processor time"

Answer: Not if you're using OpenGL.

The only drawback to scaling images is that sometimes things don't look absolutely one hundred percent pixel-perfect in every single situation. But overall, it's the best trade-off for most cases IMHO.

I guess not with openGL. Shock
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #4
leRiCl Wrote:But that means screen space is wasted!
I guess its either this or that, though.
Yeah, it's always a trade-off Wink

There isn't really any easy way around this though. The pixels have to fit the screen, or the screen has to fit the pixels, or some compromise must be reached. Letter/pillar boxing is usually the only sensible compromise for dealing with 2D projections.

leRiCl Wrote:On another note:
Warcraft 3 doesn't pillar-box on my Macbook, even if I choose resolution 800 x 600! How did they do that?

I can't recall what Warcraft 3 looked like... If it was using a perspective projection then aspect was taken care of automatically via the nature of the math behind how perspective projection works. Aspect maintenance (letter/pillar boxing) is usually only needed for strictly 2D stuff.

leRiCl Wrote:When I use SDL_SetVideoMode it pillar boxes when I specify with 800x 600 resolution, how do I remove the pillarboxing?
I don't use SDL, so I can't help there, sorry.
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #5
leRiCl Wrote:On another note:
Warcraft 3 doesn't pillar-box on my Macbook, even if I choose resolution 800 x 600! How did they do that? When I use SDL_SetVideoMode it pillar boxes when I specify with 800x 600 resolution, how do I remove the pillarboxing?

Since a MacBook Pro display has a wider aspect ratio than 4:3, there are two different 800x600 settings; one stretched, one pillarboxed. If you want to get at a setting that SDL doesn't give you, you'll probably have to go to a more direct API like CoreGraphics for changing resolution. However, you'll generally *want* the pillarboxed mode unless you're prepared to adjust for non-square pixels (by scaling your view down a small amount on the x axis).

Something to keep in mind is that Apple is working toward a goal of resolution independence, so any solution that leaves images at the same pixel size regardless of screen resolution may be a bit shortsighted.
Quote this message in a reply
Member
Posts: 90
Joined: 2006.11
Post: #6
Okay, thanks.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  DPI and Resolution for Graphics mickyg 9 8,469 Apr 27, 2012 03:02 PM
Last Post: Andres Calil
  switching screen resolution NelsonMandella 3 3,332 Apr 25, 2010 01:33 PM
Last Post: SethWillits
  OpenGL full screen mode leaves garbage on screen when exiting app Malarkey 5 5,084 Nov 19, 2008 12:51 PM
Last Post: Malarkey
  Changing resolution while already in full-screen mode? Malarkey 1 2,562 Jun 10, 2008 07:49 PM
Last Post: AnotherJake
  getting Screen resolution in Carbon majestik666 1 3,033 Jan 26, 2008 12:10 AM
Last Post: OneSadCookie