1

I made a game. I want to use it on iPhone and iPad(Universal game). I set screen 640x1136 in gamescene.sks file. When I play the game on all of iPhone, screen is seems perfect. But when I play on iPad, game screen looks bigger than iPad screen. How can I set screen for iPad?

ThatMan
  • 165
  • 10
  • Have you use storyboard or .xib? Please use proper constrain for your Game view and assign all four properties(x,y,weight,height) to your view. – Vignesh Kumar Mar 07 '16 at 13:00

1 Answers1

1

It all comes down to the scaleMode you are using.

You have 4 options

This first 1 resizes your scene frame, the others keep the scene at the size you specified and scale to fit the screen. .Resize, as stated, resizes your scene to fit your screen. If your initial scene is 10,10, it will make the scene size 320x480 on an iPhone 4s

.Fill (Default), which keeps the coordinates of your scene the same, but stretches in the x and y direction. If your game was in Landscape, and you design for a 4:3 screen, you will create a fat effect when going to 16x9

.AspectFill, which keeps the aspect ratio the same, but will scale your scene till the furthest borders are hit. If you are in landscape with a 4:3 scene, it will stretch to the left and right borders, making the top and bottom cropped to maintain the ratio.

.AspectFit, which keeps the aspect ratio the same, but will scale your scene till the nearest borders are hit. If you are in landscape with a 4:3 scene, it will stretch to the top and bottom borders, making black borders appear on left and right.

If you want your game to appear the same size on all screens, your best bet is to use .AspectFill, and plan your game around the cropping. (Basically do not put anything important in an area that gets cropped)

Knight0fDragon
  • 16,609
  • 2
  • 23
  • 44