Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Right now I am experimenting with XAML and C# to write a small Windows Store App which supports displaying a playmat with cards. However not everyone uses the same resolution and with a somehow fixed layout I run really fast into some issues. Having a really high resolution yields

hi res screenshot

where all the zones are huge (and ugly stretched) and the icons as well as the fonts are really small. Changing to a low resolution yields

low res screenshot

which is okayish so far, yet I would need to find out how to scale assets like the displayed card such that it fits the zones.

Are there any best practices, creating such fixed layouts and optimizing them for different resolutions? How should I correctly compute the sizes for a card on the table? And is there anything to keep in mind when creating fullscreen content for different resolutions?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You can base everything's size on a percentage of the screen space it should take up; for example, a card may take up 5% of the screen's width and 7.5% of its height (these are just examples).

Before you do that, you will want to go with a resolution such as 800x600 that simplifies the math to find the percentage values. Then as long as you use the relative percentages everywhere instead of absolute pixel values, it should work. Note: this is a lot easier to do in 2D, but should carry over for 3D theoretically.

share|improve this answer
    
Luckily this is 2D and the plane is being projected into 3D space using XAML and DirectX. Pretty nice effect. –  Christian Ivicevic Apr 12 '13 at 22:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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