Universal Build Tutorial with Project File

UtopianGamesUtopianGames Member Posts: 5,692
edited July 2014 in Working with GS (Mac)
Hi Guys,

After having a play around today i came up with one way to do universal builds without moving or manipulating any actors and without losing scene space or letterboxing.

It might not be for everyone because of the stretching on iPhone 5 but i think its better than the current methods.

Attached a project file and below is a short video tutorial to show you how it all works.

Tested a build on iPad and 3GS from our new game in development and it works as expected.

EDIT...Doesn't seem to work for none scrollable layers without having to manipulate actor positions.



Darren.
«13

Comments

  • TeamLava8TeamLava8 Member, BASIC Posts: 294
    This is brilliant!
  • zombiesdrulezombiesdrule PRO Posts: 131
    Nice, Thanks
  • creativeappscreativeapps Member Posts: 1,770
    @DeepBlueApps.com Thank you so much for that. Its working same for portrait mode?
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Darren, if this works on a solid basis for many game styles, you know what needs to be done next?

    DBA: UB

    Drop project file in, select Portrait or Landscape, hit play and out comes a new project file with the actor automatically applied to all scenes at the bottom of the layer.

    Make this happen .... Pretty please :)
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    @DeepBlueApps.com Thank you so much for that. Its working same for portrait mode?
    Yep - Just need to change some things around...

    iPhone 4S and below:
    So if screen HEIGHT = 480,
    Change attribute: camera.width to 862
    Change attribute: camera.origin.X to -46


    iPhone 5:
    So if screen HEIGHT = 568,
    Change attribute: camera.width to 1024
    Change attribute: camera.origin.X to -128


    iPad:
    So if screen HEIGHT = 1024,
    Change attribute: camera.width to 768
    Change attribute: camera.origin.X to 0
  • TheSkinTheSkin Member Posts: 74
    great!!!! very usefull!!! This solve some my problem.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Do the camera numbers work for other devices being the base project size?
  • OskarDeveloperOskarDeveloper Member Posts: 533
    Thanks! Great work
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Absolutely awesome :D Just one question, when using it for portrait and iPhone 5, some space at the edges of my scene get cut off, is there a way to really get the whole scene?

    @Braydon_SFX :)

    Thx so much =)
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited February 2013
    I only tested for iPad landscape and it took some tweaking backwards and forwards.

    Yes it's possible but I'm out of the office ATM, try tweaking the camera size and offset until your happy.

    If there's space at the edge after your scene is fully in then the camera size is too big.

    Darren.
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    @DeepBlueApps.com

    Thx a lot =) I will share my results when I come up with something.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    @GuaveGames - Can you post a screen shot? I'm not experiencing this issue.
  • UtopianGamesUtopianGames Member Posts: 5,692
    @GuaveGames is your background actor movable as this will cause it to move slightly even with no move rules.



    Darren.
  • RUPASRUPAS Member Posts: 823
    @Braydon_SFX @DeepBlueApps.com If you have a HUD on your project this technique does not work ...
  • debugdesigndebugdesign Member Posts: 886
    fantastic!
  • UtopianGamesUtopianGames Member Posts: 5,692
    @RUPAS Can you explain further?

    I have 5 buttons for control and they all work for me.

    Darren.
  • RUPASRUPAS Member Posts: 823
    yeah right, I have an inventory within HUD, when I apply the rule to resize iphone 5, the inventory automatically scrolls down.
  • RUPASRUPAS Member Posts: 823
    @DeepBlueApps.com is as if the order of camera resize affect all actors least the ones I have in the HUD.
  • UtopianGamesUtopianGames Member Posts: 5,692
    Are you constraining them to a camera X or Y or a global variable?

    Its hard to say without looking.

    Darren.
  • RUPASRUPAS Member Posts: 823
    @DeepBlueApps.com Darren this my rule, Thanks for yout help
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited February 2013
    Seems like the layer has to be scrollable for it to work which is not good for none scrollable HUD layers...which leaves you the option of contraining (not recommended), repositioning the X or Y depending on device which no one really should have to do or do it via the GS method.

    So it seems it wont be suitable for everyone which is a shame but at least we know about the scrollable layers now and its still useful for single screen games (in my case hence the testing) or for games that require no none scrollable layers.

    Darren.
  • LumpAppsLumpApps Member Posts: 2,881
    Aw, thats a pitty, I have been watching this to implement in my latest project but it has non scrollable layers (a hud). Thanks for the effort. My face now looks like your avatar 8-|
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited February 2013
    Got an idea...

    Darren.
  • LumpAppsLumpApps Member Posts: 2,881
    Drumrolllll...
  • mrpacogpmrpacogp Member Posts: 400
    I have hidden my hud when moves camera to upper position, and works fine.
    Constraining position of hud dont works fine on virtual device, but i have to test it.
  • RUPASRUPAS Member Posts: 823
    hahaha Go Darren!!!
  • POMPOM Member Posts: 2,599
    edited February 2013
    I have an iPhone 5 project, I managed to achieve the following effect:
    iPhone 5 native project.
    On iPhone 4, it takes the middle 480 pixels from the iPhone 5.
    On iPad - it takes the middle 480 pixels from the iPhone 5 and stretch them.

    I have scrollable and none-scrollable layers, and indeed the none-scrollable layers needs an additional rules for the iPad only (because of the stretch).

    I actually think the right way to go is to make a native iPhone 5 project cause most of the new devices have this aspect ratio, then for iPhone 4 take the middle 480 pixels, and for iPad stretch those middle 480 pixels. That's my 2 cents.

    Roy.
  • UtopianGamesUtopianGames Member Posts: 5,692
    Im not so sure tbh Roy.

    iPhone 4 taking only the middle 480 pixels is fine but what are you doing with the extra space on the iPhone 5 and iPad?

    With my method you can make an iPad project and use every bit of the scene.

    BTW the HUD is easy sorted on the none scrollable layer by moving the actors up 46 or 128 simply do a change position Y depending on the device, see pic below.

    image

    Wayne will probably make a tool soon to do all this for you.

    Darren.
  • POMPOM Member Posts: 2,599
    edited February 2013
    Im not so sure tbh Roy.

    iPhone 4 taking only the middle 480 pixels is fine but what are you doing with the extra space on the iPhone 5 and iPad?

    The thing is i find it strange to start an ipad project, the ipad res is very "old" and all devices nowadays uses a wide screen, except the iPad. if your goal is to target as much devices as possible, wide screen is the way to go (again.. IMO). and for dealing with the iPhone 4 res, you need to make some tweaks, and once you have those tweaks you all set for the iphone 4/ipad res.

    This, against making an ipad project, and stretch it to a wide screen (which like i said most devices uses today) pretty much "destroys" your art.

    But then again, i guess it depends on ones goal and type of project.

    Cheers and looking forward to your new tool.
    Roy.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Come on Wayne, I need this tool :D
Sign In or Register to comment.