Resolution & Aspect Ratio
Posted: Fri Feb 25, 2011 8:02 pm
Pretty soon I am planning on getting my feet wet (hopefully) with a simple 2D game project.
However one thing that annoys me as a gamer, personally, is when games sometimes lack a Fullscreen and/or Widescreen option for display settings.
So my questions are pretty basic.. although admittedly verbose.. How are resolution and aspect ratio independence typically accomplished? Anyone who can speak from personal experience would be really helpful I think.
One thing I hear for resolution issues is:
Design for your maximum supported resolution, and then scale down for the selected resolution when resources are loaded. This makes sense because graphics tend to scale down, better than they scale up. But how does this affect certain game calculations, like pixel perfect collisions or collisions in general? Resource positioning? How does it affect the physical layout of the 2D level you are showing?
What methods are there for this kind of "global" scaling of resources? Are there specialized libraries we need, or that others have designed? Are there efficiency concerns?
On the aspect ratio front, I am totally lost as to how to design a game that can be played either way, without black bars. I don't want to end up with a game designed for one aspect ratio / resolution and then look misshapen (stretched or squished) in a different aspect ratio, and I'd hate to have to put black bars in, or rely on the users monitor to do such.. I know very little about aspect ratios and pixel shapes though.. I know from my video editing experience that older TV's have rectangular pixels as part of the NTSC standard, while PC's have Square pixels, but I'm not sure how it works with on PC's with 4:3 vs 16:9 resolutions.. Although I know from experience that working with graphics for my magazine in 1280x1024 (5:4 AR) was not a good idea as it distorted my view of emulator screen shots.
I think for now.. I will be making a Windowed game, targetted at 1024x768 as a medium compromise. On larger 16:9 screens like mine its a big enough window to see and have fun with, and all PC's today should be capable of the resolution, so for those running @ 1024x768 I could offer a simple Fullscreen mode, or I could even offer fullscreen to everyone and let their Monitor / 3D Card do the scaling however they have set up.
However one thing that annoys me as a gamer, personally, is when games sometimes lack a Fullscreen and/or Widescreen option for display settings.
So my questions are pretty basic.. although admittedly verbose.. How are resolution and aspect ratio independence typically accomplished? Anyone who can speak from personal experience would be really helpful I think.
One thing I hear for resolution issues is:
Design for your maximum supported resolution, and then scale down for the selected resolution when resources are loaded. This makes sense because graphics tend to scale down, better than they scale up. But how does this affect certain game calculations, like pixel perfect collisions or collisions in general? Resource positioning? How does it affect the physical layout of the 2D level you are showing?
What methods are there for this kind of "global" scaling of resources? Are there specialized libraries we need, or that others have designed? Are there efficiency concerns?
On the aspect ratio front, I am totally lost as to how to design a game that can be played either way, without black bars. I don't want to end up with a game designed for one aspect ratio / resolution and then look misshapen (stretched or squished) in a different aspect ratio, and I'd hate to have to put black bars in, or rely on the users monitor to do such.. I know very little about aspect ratios and pixel shapes though.. I know from my video editing experience that older TV's have rectangular pixels as part of the NTSC standard, while PC's have Square pixels, but I'm not sure how it works with on PC's with 4:3 vs 16:9 resolutions.. Although I know from experience that working with graphics for my magazine in 1280x1024 (5:4 AR) was not a good idea as it distorted my view of emulator screen shots.
I think for now.. I will be making a Windowed game, targetted at 1024x768 as a medium compromise. On larger 16:9 screens like mine its a big enough window to see and have fun with, and all PC's today should be capable of the resolution, so for those running @ 1024x768 I could offer a simple Fullscreen mode, or I could even offer fullscreen to everyone and let their Monitor / 3D Card do the scaling however they have set up.