- Home /
2D game: background image size
I'm developing my first Unity game. It's going to be a Windows Phone 8 game.
I want to set a background image but I don't know if this image must have the Windows Phone 8 screen size.
Windows Phone 8 has these resolutions:
480 × 800 768 × 1280 720 × 1280 1080 x 1920
Does the background image have the biggest one?
There are lots of posts on image size for different platforms posted on UA. There is no one answer, but some reading will give you the choices. Unity will obviously resize images, but there is a loss of quality. Typically folks author for one preferred platform getting images to be 'pixel perfect' for that platform, and then handle the resizing on the others. Also for world objects, the vertical size viewed by the camera stays the same, but the width seen by the camera changes for the different aspect ratios of different resolutions. Some scripting may be involved in getting your background to look the way you want across resolutions.
Thanks for your comment, but I'm asking if I have to put, for example, a 1080x1920 image on the background if I'm going to release my game to a device with a screen of 1080x1920 size.
Answer by Fornoreason1000 · Mar 05, 2014 at 09:23 AM
not necessarily, 480x800 will work at 1080p, it just might look a bit blurry/pixelated depending if your using bi linear filtering or not.
if you have pixel perfect game then it gets a little more tricky. the thing is with unity(and most 3d engines), adjusting the resolution doesn't adjust what the camera actually captures. doing this involves some tricky math involving the orthographic size and normalize rectangles.
so technically you could use any resolution that takes up the whole screen. to make is "pixel perfect" you will need to adjust the orthographic size of the camera to fit the new resolution by the ratio of the two resolutions. To work this out we
Divide the higher resolution by the lower
1920 / 640 = 3
then we take it from 5(standard ortho-size)
5 - 3 = 2.
therefore the orthographic size for 480p when the native is 1080p at 5 = 2.
Unfortunately its not as easy when going to different ratio such as 1080x1920 (1.7777777778) to 768x1280 (1.6666666667)
Your answer
Follow this Question
Related Questions
Are older versions of game projects available anywhere? Want Stealth for 4.1.5 1 Answer
Detect Game Center login prompt? 1 Answer
Good Quality in Unity but ! inGame 2 Answers
How to have coins burst out in random directions after destroying an object in unity? 2 Answers
What is AssetBundle compatibility for MetroPlayer and/or WP8? 1 Answer