# Is it a good idea to make a game for one aspect ratio and arbitrary screen resolution?

After several very small games I have decided to make something more standalone (2D) and playable. However, I have met the problem of every game that is going to be played in more screen resolutions.

Basically, after some research I see that there are several solutions.

This seems to be the simplest one: Let's say I define a constant aspect ratio for the game (16:9) and the whole game will be created for a resolution 1680 x 1050.

The game will be rendered in this resolution and then I will be able to scale the render to match the player's display resolution. Therefore the game might be playable on almost any resolution, while it would keep the aspect ratio. So, if the game was run on 4:3 display, the top and the bottom of the display would be filled with black color.

It seems easy, but my question is - Is this a good approach for a simple game? The game will be simple, but I want to maintain high quality.

• Whether it's a good approach or not seems to be a question for you to decide. Is that the approach you want to take? Is yes then it's a good approach. If you feel like this would be simplest for you, then go for it. – MichaelHouse Jun 11 '12 at 19:47
• Sure, in my project it's my responsibility to decide. I think I will use this method. However, I'm also interested in opinions of others, that's why I've asked if it is a good idea in general (although I have mentioned "my game"). – Miroslav Mares Jun 11 '12 at 19:54
• Do you realize that 1680x1050 is not 16:9? It's 16:10. – Adam Jun 11 '12 at 22:44

It's a fair approach, I've seen not-so-simple games using it.

However, as your target is high quality, I advise you to support all aspect ratios properly. You don't want your players annoyed because you're using only a percentage of their pixels.

So you've got two options:

1. If you only have a few aspect ratios to support (e.g only 4:3 and 16:9), you can cheat and use distinct sets of absolute positions and sizes for your 2D elements. One for each ratio. This might sound cheesy, but it's actually a fine solution in this situation, as option 2. is way trickier.

2. Use a library that supports adapting 2D elements to ratio changes. You might think this is an easy task to re-create one yourself, but it's not. So if you feel like going this way, be ready to craft your library with rigor. I've seen several people falling in the trap of just-creating-a-menu-system-in-2-days. Nope. This takes way more time. Goodbye absolute placement: you need anchors, relative sizes, extra care for the safe areas, etc. That's a broad topic (and a boring one, IMHO), and that's one of the main selling points of UI middlewares such as Autodesk Scaleform.

Once you've picked up your option, always make sure you test thoroughly your layout changes with all the different aspect ratios.

PS: You're not concerned by this as you're making a 2D game, but for the record: for 3D rendering, adapting to different aspect ratios is only a change to the perspective matrix.

• Are there any extra materials available for 2nd option? And is there something I could read on the subject for 3D? – joltmode Jun 15 '12 at 14:03
• @Tom For 3D, really, that's an easy one. For instance with OpenGL/GLU, just specify the proper ratio in the aspect variable of gluPerspective. For 2D, I strongly advise to go for solution 1. or a variant, check this for more ideas. Getting 2D elements to adapt to any ratio could be another question as it's a very broad topic! – Laurent Couvidou Jun 15 '12 at 14:10

To answer the question: yes, it is a good idea to make a game for a given aspect ratio and screen resolution.

However, it is only a good idea in certain circumstances.

Those circumstances include, but are not limited to:

1. developing for a platform with a particular aspect ratio and screen resolution like a console where display hardware is fixed (which it does not sound like what you are doing)
2. the game relies upon the aspect ratio for some reason that should it need to be retooled for a different aspect ratio it would somehow ruin the game play (doesn't sound like you have this either)
3. Deliberate stylistic reasons (it doesn't sound like you are doing this either).

If your reason is "because it is hard and complex to support multiple aspect ratios", then if that is enough of a reason for you, it is your game.

• I'm programming for computers/notebooks (Windows mainly). I would like the simplest solution while keeping the game quality high. Well, if the game had levels which would have fixed size (not square), that seems as a legit argument, doesn't it? – Miroslav Mares Jun 11 '12 at 20:09
• The big three console manufacturers all require that you support at least two aspect ratios (4x3 and 16x9) and two resolutions (SD and 720p). Otherwise you'll fail certification. – Crashworks Jun 11 '12 at 20:10
• ok... scratch number 1, then! – PlayDeezGames Jun 12 '12 at 12:43
• I'm pretty sure at least one of the big three doesn't require you support 720p... – user744 Jun 12 '12 at 15:30
• @Joe Yet. But I bet this will change by the end of the year ;) – Laurent Couvidou Jun 12 '12 at 17:58