iOS coordinates for iPad and iPhone game using spritekit

188 views Asked by At

I am trying to make a game using sprite kit that works on both iPhone and iPad.

For iPhones I can set the scene size to 320x568 and scale it for all resolutions it works fine. For iPads too this works fine. But as the point resolution on iPad is 768x1024 I can see scaling artifacts and also images are not sharp.

So I want to set the scene size to 768x1024 for iPads. Most of my game images are drawn using sprite kit instead of loading images. So when I set the new scene size the images look smaller.

What would be the best way to specify the correct dimensions for the images while drawing it? Would I have to convert each and every dimensions and points used based on the device type?

1

There are 1 answers

2
sangony On

You can draw your images using the largest screen size and scale them down to fit smaller screen sizes. This works well if the aspect ratio is the same for devices like iPhone 5, 6 and 6+. You do have to create separate images and/or screen layouts for the iPad and iPhone 4 which have a different aspect ratio.