I'm currently building a 2d mobile game and I'm currently stuck trying to get my game to scale with screen sizes. Currently my background is scaled to 1920 X 1080. When I run the game on my Galaxy S10+, it scales to 1920 X 1080, but you can see blue space on the sides (See Image). How do I get that 1920 x 1080 background to fill the entire screen without using a UI canvas?

I want the game to fill the entire screen. If I set the resolution to the Galaxy resolution, it fills the entire screen. But won't this look weird on other screens that don't have the same resolution?

I'm not trying to scale any UI. Everything I find online is only talking about scaling UI. That's not the issue. I'm trying to get the entire game to adjust based on screen sizes. 1920 x 1080 Scale

  • \$\begingroup\$ This is a different aspect ratio than 16:9. So if you scale it up to fill the horizontal space, you'll cut off some content at the top and/or bottom — is that acceptable for your use case, or do you need some more sophisticated transformation to keep the game playing similarly in different aspect ratios? \$\endgroup\$ – DMGregory Nov 27 '19 at 2:31
  • \$\begingroup\$ Possible duplicate of Fitting Android game to different screen sizes \$\endgroup\$ – TomTsagk Nov 27 '19 at 10:14
  • \$\begingroup\$ Hi Michael Hampshire, there plenty of questions currently on this site of how to handle a game on different screen sizes. Have you taken a look at any of them? Also if you search online for it, you will get more than enough results. Have you tried any of those? \$\endgroup\$ – TomTsagk Nov 27 '19 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.