Can you give me a quick tour for an application which has to work in different resolutions. It's a game, with lot's of graphics and images and effects. We are using C#. The game is simple 2D, looking like OGame but working like a desktop application. Our problem is how to make it compatible with different resolutions. What I expect you to give me is an advice - which technologies or combination of technologies and/or some basic tricks I should use to make my application work the same in different resolutions. Thank you!


What you can do is draw everything to a rendertarget with a nice resolution. Say 1280x720 (a lot of games use this resolution or lower on the consoles). You then get the texture from the rendertarget and stretch it over the entire screen (you might want to add Anti-Aliasing as a post process step when upscaling). When you you stretch the game to a non-widescreen resolution you should add black bars on the top and bottom.

This approach works fairly well, and is easy to implement. But if you want to support a very large set of (odd) resolutions (say 640x480 to 1920x1080) you have to make sure the text and everything is readable by testing the game at all resolutions. Btw don't use anti aliasing when downscaling as this will actually worsen the image.

| improve this answer | |
  • \$\begingroup\$ Design different UIs based on aspect ratios, not resolutions. Creating different sizes for text and icons is relatively trivial. \$\endgroup\$ – ChrisC Sep 27 '11 at 18:03
  • \$\begingroup\$ @CCRicers, designing 2 UIs is double the work, but might be doable. However when you start creating different sizes for text and icons means that you have to check an insane amount of combinations of text lengths, text sizes, etc... Depending on how stylistic your GUI is this can be quite a PITA. \$\endgroup\$ – Roy T. Sep 28 '11 at 5:18
  • \$\begingroup\$ @Roy T. I am only basing my view on creating different text sizes based on your suggestion to not simply downscale big text with anti-aliasing. Though I'm not sure if you really mean using a linear filter? In my experience downscaling with a linear filter has always given acceptable results. \$\endgroup\$ – ChrisC Sep 28 '11 at 16:45
  • \$\begingroup\$ @CCRicers tbh I hadn't thought much about downscaling. Using 720P as a baseline I usually only have to scale up. But a linear filter, or maybe other filter types too can probably help to keep text readable. \$\endgroup\$ – Roy T. Sep 28 '11 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.