Making your game compatible across devices
DaveGWelsh
Member Posts: 60
Hi All,
So my game is almost finished but I just tried running it on the iPhone 3G simulator and it was missing the top part of the screen.
Is there a way to make it scale automatically or do you need to create different versions etc?
Thanks in advance!
So my game is almost finished but I just tried running it on the iPhone 3G simulator and it was missing the top part of the screen.
Is there a way to make it scale automatically or do you need to create different versions etc?
Thanks in advance!
Comments
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
I've been developing on a screen size of 320 X 568. So there dis no way to get it to scale down for a smaller sized screen?
Oh man, I'm really sorry for that one!
You have to create rules how to detect the current device (for example (portrait mode)
if screensize.width is 768 it is an iPad, if its 640 it is iphone, screensize height 960 is iphone<5 sreensize.height 1136 is iphone5) than you have to adjust camera to the device.
There are several threads and tutorials in this forum how to do this...)
Instead of positioning your actors to absolute positions, set them in relation to the screensize. if you want the actor in the middle set x-position to screensize.width/2 and y-position to screensize.height/2, etc
For other positions create formulas. I divide the screensize by 24 for each device and set this value to an game.attribute (xpreset and ypreset) and position my actors to screensize.width/2 +/- n*xpreset for x-axis and similar to y-axis and so on
Test all changes and new actions for all targeting devices and if necessary adjust the position for each device. If necessary create separate rules for every device iPad, iPhone4 and iPhone5 and make your adjustments.
When all is looking good and working fine, publish using overscan or cropped as universal build and you are done.
All images have to be double sized IPad actor size and resolution independent checked.
If you want to modify an existing game to other resolutions it will be much more difficult as to design it for all devices in the first place, but you can still be successful using the methods I have mentioned above.
good luck
All actors are being displayed, no problem. The thing that is happening is that the top part is not being displayed. My image is 960 X 640. I've ticked Resolution Independence but it still doesn't work correctly.
However, when I test with Overscan set to 'Off', the image is displayed but it has the bars down the sides.
You have to adjust the camera to the screen size of the different devices (and the images and the positions, etc)
...or you wait for the stretch option coming to the stable builds, but I am no fan of it and would not recommend to use it.
You mentioned before about tutorials for this. I've searched but to no avail. Any hints?