- Home /
Handling Multiple Resolutions in 2D?
So I am currently testing my skill by going back to basics and creating simple games. Currently I am on Break Out. I stumbled across a problem that I am not sure how to solve and was hoping you guys/gals might be able to help me out.
The problem is that let's say I setup my game with a resolution of 1920 x 1080 in mind, as that is my resolution. My bricks are 64 x 16 in size, imported using the default 100 pixels to units setting, Camera Orthographic Size is set to 5.4. Game looks and plays wonderful.
Now I want to think about my other players, and let's say for some reason somebody plays the game in a resolution of 640 x 480. I create a script that adjusts the camera orthographic size automatically based on resolution and so 640 x 480 is given a size of 2.4. Well now...half the game is no longer visible as I set everything up to match 1920 x 1080 resolution. I know the orthographic size is only a part of the problem...but it is set correctly or so I think?
What exactly do I need to adjust to ensure that the game looks the same on all resolutions without having to create a game scene for every different type of resolution? Also, on higher resolutions I would imagine the bricks start to look a little small, so maybe I want to scale them up a little. How does that affect the process?