Making your game compatible across devices

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!

Comments

  • Thunder_ChildThunder_Child Member Posts: 2,343
    Ah poor guy. Another reason we all want this fixed. Its a contining issue. The pros have it figured out. I have tried every universal build I can find. Some times it works but most the time I decide screw it and build for ipad only until GS fixes it so one build...all platforms. Im not sure hoI feel its still in the freezer. Not even thawed in their kitchen. Def not in the cookbook. Last time I merged an ipad build it squished my whoke game to 1/3rd of the screne size. Tossed that UB2 and Ub3 out to the trash bin. Good luck finding a real solution. I cant.
  • DaveGWelshDaveGWelsh Member Posts: 60
    Ah, crap.

    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?
  • DaveGWelshDaveGWelsh Member Posts: 60
    Also, and I really apologize for this VERY noob question, but when setting up your scene, which rectangle should you be using as the screen boundary? The inner or outer one?

    Oh man, I'm really sorry for that one!
  • slowcutslowcut Member, PRO Posts: 164
    You have to design your game from the beginning keeping in mind, which devices you will targeting.
    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
  • DaveGWelshDaveGWelsh Member Posts: 60
    Thanks @Slowcut for your response.

    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.
  • slowcutslowcut Member, PRO Posts: 164
    Resolution Independence has nothing to do with your screen size, It just adapts images to retina and non retina displays (if image size is twice as big as actors size)
    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.
  • DaveGWelshDaveGWelsh Member Posts: 60
    Thanks man. Much appreciated!

    You mentioned before about tutorials for this. I've searched but to no avail. Any hints?
  • slowcutslowcut Member, PRO Posts: 164
    I do not know any tutorials, but if you use the search function you will find lots of them here in the forum
  • DaveGWelshDaveGWelsh Member Posts: 60
    Thanks slowcut.
Sign In or Register to comment.