universal qusetion n help. best way?
GGS
Member Posts: 51
hey.
i am working on a runner, ipad scale atm.
whats the best way to make it universal and whats the best tut or code to make. i tried the GShelper video but the game went all squished into 1 thin line. exsample here is normal screen [:::::] lets say that ipad screen looks fine when i did the code it became [:] became very squishd
any advice??
i am working on a runner, ipad scale atm.
whats the best way to make it universal and whats the best tut or code to make. i tried the GShelper video but the game went all squished into 1 thin line. exsample here is normal screen [:::::] lets say that ipad screen looks fine when i did the code it became [:] became very squishd
any advice??
Comments
First:
Save a new copy of your game, in case you mess thing up.
Heres what I did:
I made an actor called "DetectDevice"
and an integer attribute called "Device"
Place the actor in the scene, and create rules inside it.
Rule: If screen size = 480 change attribute "Device" to 1 (This is old Iphones)
Rule: If screen size = 568 change attribute "Device" to 2 (this is Iphone 5)
Rule: If screen size = or bigger than 1024 change attribute "Device" to 3 (this is Ipad)
Then you can have the next rules in witch actor you like. I had them in the goal. But you can probably have them below in the the "Detect Device" actor. This actor needs to be unlocked in the scene, because you`ll need to access the scene attributes.
Double click the actor and unlock it.
Rule: if Device = 1, change attribute, current scene - screen size width to 480
Rule: if Device = 1, change attribute, current scene - screen size hight to 360
Rule: if Device = 2, change attribute, current scene - screen size width to 568
Rule: if Device = 2, change attribute, current scene - screen size hight to 360
Rule: if Device = 3, change attribute, current scene - screen size width to 800
Rule: if Device = 3, change attribute, current scene - screen size hight to 600
These last number you`ll have to experiment on. Theese numbers will zoom out the screen, but if you want to keep the scene size you might wanna try someting like 568x400 or 568x440 or something.
You can use different numbers then I did, to have the camera showing bigger parts of the scene. In my game Die For Metal the Ipad version shows a much biggert part of each level, than the iphone version.
Also if you have buttons, timers or other objects on the screen, you`ll need to make rules telling them to change position based on device.
For example: if "Device" = 1 change attribute, self, position X to 90, and self position Y to 300. (just an example, this will be different for every actor.)
It`s a lot of work, but it`s really worth it
Hope this helps you, and you`ll figure out the numbers that best suits your game.
Best of luck to you