# 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?

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)