Sign in to follow this  
EvilNando

Screen resolution independence

Recommended Posts

Reading the xna website I found out that it is recommended to have your game displayed on a 720p resolution. I fear that asking my artist to produce pixel art for a 720p display will be too much of a burden so my idea was to create a lower(read: more traditional) resolution art and the re-render the whole scene directly to 720p I remember doing something similar in DirectX but I'm no sure if this is still possible inside XNA (probably using render targets?) Does anyone knows how to accomplish this? Thank you

Share this post


Link to post
Share on other sites
The point of using 720p is that you can scale up and down to different resolutions and aspect ratios and still get a pretty good display.

The lower you go, the more you'll have to scale up. 720 is a good go-to because consoles use it.

Damn I just read a real good blog post on this, but can't find it.

If I'm running 1680*1050 (16:10 aspect), you'll draw at 1150*720 and scale it up. If I'm at 1024*768 (4:3 aspect), you'll draw at 960*720 and scale it up. This way you don't end up drawing more and more of your world at higher resolutions, but you can also support different aspect ratios without stretching.

UI you draw native, relative to edges or center, and just make sure to stay inside 4:3.

Hope that made sense, it's been a looong day..

[Edited by - CadetUmfer on June 21, 2009 9:44:59 AM]

Share this post


Link to post
Share on other sites
Yeah, I actually made a few blogs of my own about such a thing here (and specifically here). However, it is embarrassingly garbled logic and I still have yet to post my final results so I'll just recap.

The basic idea is to use the floating-point vectors of 3D coordinates to your advantage. You would define a 'virtual' resolution and then scale actual pixel sizes to floating-point percentages and use them as the polygon's vertices in 3D space. The final step is to then take into account the aspect ratio using a view-transformation matrix and BAM, yer done. Because all of the sizes are scaled to the desired 'virtual resolution' you can run in any physical resolution and the display will scale automagically for the most part. Granted, taking into account different aspect ratios is more work but I really can't speak from experience there.

hth

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this