Traditionally I have used the 5:4 aspect ratio as the base point for the design of my game on console, mobile and pc. This was years ago and made a lot of since back then (specifically since I had a 5:4 aspect ratio on my computer back then haha).
While it is necessary at times, I generally am not a fan of games that are built for 16:9 blackbarring themselves into a 5:4 screen and shrinking the display area by a third.
My current thought is that I will target a 3:2 aspect ratio as my primary play area which will waste some real estate on mobile devices made within the last 5 years but I can’t help but think that I might be making this sacrifice for nothing. Perhaps 5:4 and 4:3 are remnants of the past. Overwatch, one of my favorite games, seems to think so (though they are some people not fond of that decision).
I’d like to hear about your recent thoughts and experiences on this topic if you’d be so kind. Thanks for reading!
On my current project I just have an ortho main camera (3D content comes from other layered cameras and render textures) and was able to just tweak the camera position for something that looks good at all the major aspect ratios.
For all-3D, frustums are easy enough to calculate, I did similar things for a fully 3D “orbit” type camera last year. That code is way too app-specific to be of interest (takes into account which objects must be in-view, etc) but the 2D code should give you an idea of how easy it is to decide on basic parameters at startup. Basically, plan the scene for the maximum possible coverage and make sure important stuff is on-screen at all aspects.
It’s really the same problem as safe area design when you target consoles that will output to televisions.
int aspect = (int)(Camera.main.aspect * 10f);
switch (aspect)
{
case 12: // 5:4
Camera.main.transform.position = new Vector3(0f, 0f, -250f);
break;
case 13: // 4:3
Camera.main.transform.position = new Vector3(0f, 0f, -235f);
break;
case 15: // 3:2
Camera.main.transform.position = new Vector3(0f, 0f, -210f);
break;
case 16: // 16:10
Camera.main.transform.position = new Vector3(0f, 0f, -195f);
break;
case 17: // 16:9
Camera.main.transform.position = new Vector3(0f, 0f, -175f);
break;
}
There are actually 1:1 monitors out there. They’re mostly used for installations and POS terminals, but they exist. It’s actually a little weird to look at them because you kinda expect a rectangle instead of a square.
I had a job for a year doing cash-register programming (hex-code machine language… ugh), very familiar with them.
But under resolution there is 1x1 and 2x2. Probably just mis-reported data but it did give me pause…
Not exactly on topic but very related, one of my projects involves pixel perfect rendering and my method could easily be used to check different aspect ratios.
I wrote a quick post about that some time ago, basically: i just draw rectangles of all resolutions after their respective pixel-multiplier into my game and zoom out to see all their virtual screen borders, then i can easily check if the rectangles contain everything they ought to contain and nothing that they shouldn’t. Here is the full post
It is just helpful for the scene-camera of course, your UI-Scaling/Anchoring must be checked otherwise.
For 3D cameras you need some screen-space math to draw the correct borders, tangens functions are your friend