0
votes

I am creating an iOS game using sprite kit scene. My sprite kit scenes are sit to a scale value of x = 1136 by y = 640, creating a horizontal game play. This resolution adjusts to all iPhones up to iPhone 8. However iPhone X and iPhone 11 have a different aspect ratio for their screen resolutions than the other iPhones. I was wondering if there is a setting or something that can be done programmatically to adjust the set game cg points and image sizes to adjust to the iPhone X and iPhone 11 without individually changing cg points of all images and image scales in code.

1
Sprite kit scales for you. If you need pixel perfect, set scale mode to .resize - Knight0fDragon
yes, sprite kit scales to all versions except iPhone X and iPhone 11. the bottom and edges of the screen get cut off - Gage
No, it scales to all versions. Use .fill if you want goofy stretching but 100% fill, otherwise account for the loss - Knight0fDragon

1 Answers

-1
votes

I figured it out. You can manually change the aspect ration to adjust to the device being used. To figure out the right aspect ratio you need use this link https://developer.apple.com/reference/spritekit/skscenescalemode