How do the pros handle multiple resolutions in UWP apps.

Devs,

My question is about how best to support screen resizing as is likely to occur in a Windows 10 UWP Application.

Currently my code handles the on Game.Window.ClientSizeChanged event. But All I really do is resize the destination rectangle and realign UI elements such as buttons based on the new ClientBounds. As you know this just ends up stretching or shrinking the images to fill the new window size.

How do the pros do this? Do they have assets for two our three main resolutions and just pick the closest?

Chris

That is actually how Valve did it for the original Half Life. They had several fonts and UI images at different sizes and chose the most appropriate sizes to load based on the screen resolution.

The approach you take depends on what look you want. Do you want the UI items to remain the same size relative to the screen or to remain the same pixel size regardless of screen size?

@cclements1384 Sorry for the late post, but I’m just catching up on posts as I’ve been away from monogame for a while.

Would the below link be of use? I used it in a game I was messing around with last year and it seemed to be working ok - if the user changes the screen to an aspect ration not equal to the one you design in (e.g. 16:9 - 1920x1080) then it will render borders at the ends (letter / pillar) depending on resolution.

Since I think most people have 1920x1080 these days (on windows) if not better, I would guess it would be safe to design your images for this resolution and then using the below resolution script you can scale it.

My issue that may not help here is that I have no experience in other platforms - only windows, so doing a game for both a large windows display and a small phone/tablet is a puzzle to me to.

Hope this helps.

http://www.david-amador.com/2010/03/xna-2d-independent-resolution-rendering/

If you want to use that code I ported it to MonoGame for DesktopGL, iOS, Android, and UWP:

easy-to-use nuget package:

example apps:

I usually design for 720p, it works good in all the simulators. Hoped this helps.
Cheers!