Adjusting my background image for different phone sizes?

Hello,


I have my GameScene.sks frame set to 750x1334 pixels (iphone 8). Inside of it I have one image which I want to stay the same across all devices, and a "border" image that surrounds the screen that I want to expand for different phone sizes. I have created new images for all screen resolutions bigger than the iphone 8, but couldn't figure out how to get them to display for different phones. How would I go about doing that?

Replies

Make one big image that contains the stay-the-same part plus the border. Create the scene to have the size of the stay-the-same part. Set the scene's scaling mode to aspectFit. Put the background image in the center of the screen. Different parts of the image border will get cut off for devices with different aspect ratios. (Or maybe aspectFill and set the size appropriately so the smaller dimension matches the desired stay-the-same part.)