Universal Builds for iOS and Android,and anything else,using iPad build and "Stretch" no distortion.

13»

Comments

  • BBEnkBBEnk Member Posts: 1,764
    edited January 2015

    If you have a single scene game this video might make it even easier to set up for universal. I should have mentioned this in above video I forgot.

    This works the same as above but uses a camera origin offset to center play area.

    Video and project below.

  • BonepileGamesBonepileGames Member Posts: 194

    Nice @BBEnk !

    What should I change if my game is in iPad Portrait?

    Thank you in advance

  • BBEnkBBEnk Member Posts: 1,764
    edited March 2015

    @BonepileGames the constrain attribute that gets the new camSize is the only thing you would change so it would read,

    attribute game.camSize to: game.screen.size.height*768/game.screen.size.width

    and change attribute current.scene.camera.size.height to camSize.

    and thats it.

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Hey @BBEnk,

    I've been trying my best to study universal builds and get the hang of them, but I am still very confused... I feel you have the best way of going about this and was wondering if you could help me out?

    I am making a vertical (portrait) endless runner type game with multiple scenes; (menu, gameplay, shop, characters...etc). I've created my entire project for iOS, in iPad (portrait). What I am trying to do is scale everything down to fit smaller devices, including android devices.

    Is there a simple project file you could possibly send my way, that I can view for my type of game?

    Thanks, your help is greatly appreciated :)!

  • BBEnkBBEnk Member Posts: 1,764

    @As Of Latte said:
    Hey BBEnk,

    I've been trying my best to study universal builds and get the hang of them, but I am still very confused... I feel you have the best way of going about this and was wondering if you could help me out?

    I am making a vertical (portrait) endless runner type game with multiple scenes; (menu, gameplay, shop, characters...etc). I've created my entire project for iOS, in iPad (portrait). What I am trying to do is scale everything down to fit smaller devices, including android devices.

    Is there a simple project file you could possibly send my way, that I can view for my type of game?

    Thanks, your help is greatly appreciated :)!

    @As Of Latte You don't have to scale anything down, your camera will just get taller you only have to take that into account. I will make another video for portrait builds using a simple endless running sort of thing.

  • BBEnkBBEnk Member Posts: 1,764

    Here's a portrait video build. A basic endless runner sort of thing not much to it really but should help you get going, I also put the finished project below.

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    @BBEnk This is awesome!! Thank you so much! You didn't have to go through all the trouble of making a vid tutorial, but I greatly appreciate it :smiley: Everything works perfect!

    One small thing...I do have a black space above the game while previewing on other devices, other than iPad. Like you mentioned, I have to take into account my graphic size while designing, correct? What would you recommend a good background size to design in, that would fit with all devices?

  • BBEnkBBEnk Member Posts: 1,764

    I think the longest background will be about 1366 so I build mine out to 1400 just to be sure theres no black space.

  • jigglybeanjigglybean Member Posts: 1,584

    Awesome stuff @BBEnk thanks so much. I have a question though. I get kinda lost around the part where you prevent your actors from all stretching too.

    Can you point me in the right direction where I need to look?

    thanks

    G

    Like Balls? Then click here! We've 100 coming soon

  • BBEnkBBEnk Member Posts: 1,764
    edited April 2015

    @jigglybean the actors don't stretch just the the camera so more of the scene is visable, But sometimes you may have a background that needs to loop and in Landscape the camera gets wider so you will have to take that into account to make your actors fit. So you can just stretch them out to fit as one easy example, or tile them also.

  • jigglybeanjigglybean Member Posts: 1,584

    Thanks! I actually then watched the landscape video and it all became a bit clearer :)

    Like Balls? Then click here! We've 100 coming soon

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343

    Hey @BBEnk I had a quick question.

    I've been building my game based off your universal build portrait template and everything has been going great. Thanks again!

    My question is;
    What rule would I input to say if actor moves off the top of the screen, it would be a game over?

    The code I'm using now works with iPad preview 50%. But with iPad 100% preview or iPhone devices, I can continue moving the actor off the top of the screen and a game over is never reached... Would it be something with the camsize or offset attributes? I just can't seem to figure it out, to work consistently for all devices :#

    Here's what I am using now. Thanks in advance for your help!

  • BBEnkBBEnk Member Posts: 1,764
    edited June 2015

    self.Position.Y > game.Screen.Size.Height+self.Size.Height should work fine.

    or you can use camSize.

    self.Position.Y > game.camSize+self.Size.Height would also do same thing.

  • As_Of_LatteAs_Of_Latte Member, BASIC Posts: 343
    edited June 2015

    @BBEnk Awesome, worked perfect :) Thanks.

  • whoisjose04whoisjose04 Member, PRO Posts: 5

    @BBEnk I've about finished my very first game. The thing is, I have a few buttons and backgrounds that move into position and do something (i.e play music, etc.) when it's at x-position or another actor is at x-position. I'm assuming using this would mess with positions and so some rules i set wont exactly work. Suggestions?

  • BBEnkBBEnk Member Posts: 1,764

    @whoisjose04 said:

    BBEnk I've about finished my very first game. The thing is, I have a few buttons and backgrounds that move into position and do something (i.e play music, etc.) when it's at x-position or another actor is at x-position. I'm assuming using this would mess with positions and so some rules i set wont exactly work. Suggestions?

    This doesn't change any position's just the camera size, But you will have to account for the extra screen area. For instance if your actor currently move's to x.position 512 and plays music "which is center of iPad display".

    Now on iPhone5 x.position 512 is no longer the center so you would add to your rule that says move to position 512 you might change it to move to position 512+offSet/2.

  • whoisjose04whoisjose04 Member, PRO Posts: 5

    @BBEnk said:
    whoisjose04 said:
    Now on iPhone5 x.position 512 is no longer the center so you would add to your rule that says move to position 512 you might change it to move to position 512+offSet/2.

    got it.. will implement and test. Thanks!

  • NimbleBugNimbleBug Member Posts: 483

    @BBEnk is this new "Device Platform attributes" helpful to fix this "Stretch" no distortion

  • BBEnkBBEnk Member Posts: 1,764

    @NimbleBug said:
    BBEnk is this new "Device Platform attributes" helpful to fix this "Stretch" no distortion

    I think it would be a lot more trouble because you would have to detect each device and adjust from there, when my way detects every device iOS,Android,ETC to start with and adjust from there automatically.

  • NimbleBugNimbleBug Member Posts: 483

    @BBEnk said:
    I think it would be a lot more trouble because you would have to detect each device and adjust from there, when my way detects every device iOS,Android,ETC to start with and adjust from there automatically.

    @Lost_Oasis_Games some thing like this ?

  • l3anl7l3anl7 Member, PRO Posts: 8

    Why actor lock do not follow background ?
    help me please.

  • BBEnkBBEnk Member Posts: 1,764

    @l3anl7 said:

    Why actor lock do not follow background ?
    help me please.

    You have them on a non-scrollable layer, like what was said in your thread below not sure why your asking this in my thread about universal build.

    http://forums.gamesalad.com/discussion/comment/559065/#Comment_559065

  • l3anl7l3anl7 Member, PRO Posts: 8

    I've to try but I ccan't do this.

  • BBEnkBBEnk Member Posts: 1,764
    edited October 2015

    Using Universal Build and Parallax scrolling, Two simple ways to make it work.

    Template in video:
    https://dl.dropboxusercontent.com/u/58782733/scrollTest.gameproj 2.zip

    Video:

Sign In or Register to comment.