Universal Build for iOS and Android
Angeloblu777
Member, PRO Posts: 35
I finished my game . I started my game with iPad Portrait size ( my background is w-768 , h-1024 ) . I thought it would be good enough to work for all devices ( iOS and Android ). Using " Overscan" it works on my Android tablet and iPhone 4S but my game does not work for Samsung galaxy S4.
I tried using "Letterbox" and it works but the game is not in a full screen mode( it shows black gaps on top and bottom of the screen ).
When I use "Stretch" option everything looks stretched.
I want my game to work on all the devices ( Tablets, Phones - Android and iOS )
I am adding my demo. Can somebody please modify it for me. I would really appreciate it.
Comments
what do you mean when you say does not work
testing on Samsung Galaxy S4 the game does not appear full on the screen using "Overscan".My game looks cut on both left and right side.
@Angeloblu777 Check this video, a method from ipad portrait to universal
heres your game.
https://dl.dropboxusercontent.com/u/58782733/universal_builds_iPad_Portrait.zip
I would recommend checking out my videos on Universal Builds.
BBEnk your link https://dl.dropboxusercontent.com/u/58782733/universal_builds_iPad_Portrait.zip ...dont work i have "BugsplatReporter" ...something its wrong with the project file. Please try send me again...Thank you
@Angeloblu777 I downloaded BBenk project and attached it try downloading it here
I can download but i can not open project with gamesalad? i have "BugsplatReporter"
@Angeloblu777 Alright then do it yourself I will copy what he did this method uses stretch , create 2 game attributes call them camsize and camoffset
create an initial scene , create an actor place it on the screen and unlock it
- constrain game.camsize to (game.Screen.Size.Height*768)/game.screen.size.width
- constrain game.camoffset to game.camsize - 1024
- change attribute scene.camera.size.height to game.camsize
after 2 seconds change scene to your first scene
place an actor in each scene unlock it , and have these 2 change attributes in it
change attribute - scene.camera.size.height to game.camsize
change attribute - scene.camera.origin.Y to - game.camoffset/2
in your score_left and score right actors put a change attribute to keep your controls in same position on each device
change attribute self.position.Y to self.position.y-game.camoffset/2
thats it.
or if you want another method with overscan check this thread
http://forums.gamesalad.com/discussion/86157/my-universal-binary-overscan-secret-weapon/p1
I try using second method with overscan from this thread http://forums.gamesalad.com/discussion/86157/my-universal-binary-overscan-secret-weapon/p1
Working on Portrait Mode:
Since overscan will cut off the sides of the screen, we only need to worry about left and right. So change self.position.X to
For actors on left side of the screen: Self.Position.X+abs((((game.Screen.Size.Width*1024)/game.Screen.Size.Height)-768)/2)
For Actors on right side of the screen: Self.Position.X-abs((((game.Screen.Size.Width*1024)/game.Screen.Size.Height)-768)/2)
I modify my demo and score on left and right using those code don't work ... please check demo now