Automatically change actor size/position for different device aspect ratios (Template)

nikkonnikkon Member, PRO Posts: 111
edited December 2012 in Working with GS (Mac)
Hi,

Thought I would share a template I created to convert my iPad app "Loopy Lost His Lettuce" to iPhone/android version.

It basically works out the percentage difference between the devices screen aspect ratios and moves/resizes the actor accordingly.

This has allowed me to create one version which will move actors to the correct position on all devices irrelevant of screensize (with overscan enabled). I mainly used this on all overlay HUD actors. The majority of my project was designed within the android 4:3 area.

I'm still relatively new to gamesalad so if you find any issues let me know. I'm sure the template can be improved so feel free to modify/improve and post it back to help other users.

Also note as my project was created at iPad retina res, for the iPhone version I resized all my images by 50% from within the gamesalad project file. This set the images close to the native iPhone resolution and improved performance quite a bit.

Hope this of some help.

Have uploaded template here > http://www.mediafire.com/?2g0j7wuls7i12wo

Thank,

Nick

Comments

  • nikkonnikkon Member, PRO Posts: 111
    Also note > I used this to convert from iPad to iPhone/Android. I have an attribute called "isPad". When this is false it will enable the dynamic changes.

    When i published my;

    iPad version I set 'Platform' within gamesalad to :iPad Landscape: with "IsPad" to True.

    For iPhone version i set 'Platform' to "iPhone Landscape" with "IsPad" set to false

    For the android/Nook/Kindle version i set 'Platform' to "Kindle Fire Landscape" with "isPad" set to false.
  • mrpacogpmrpacogp Member Posts: 400
    well, i,m testing this values on android, and works fine, but one question..

    On your project when you say:
    change attrib game devicewidthno to :((1024-(1024*((( game.Screen.Size.Width / game.Screen.Size.Height )/(1024/577)*100)*0.01)))/2)

    1024 x 577 is camera size isipad is false really?
    and the two first 1024-(1024?

    Game device height is calculate on 768 (ipad height)-577 (camera height)?

    And at finally,
    game devicepercentchange is (( game.Screen.Size.Width / game.Screen.Size.Height )/(1024/577)*100)*0.01

    1024/577 is another time camera size really?

    I have to check RI i know, but my project was made on iphone legacy and my scene is 2048x512 with camera size 480x320 and i want to test how works with that resize techniques.

    Its using overscan all time really?
Sign In or Register to comment.