Universal Build Tutorial with Project File

2

Comments

  • ChirpinGamesChirpinGames Member, PRO Posts: 214
    @DeepBlueApps.com any idea on how to stop a pause screen breaking the camera offset rules?
  • DoguzDoguz Member Posts: 500
    Being in the graphics industry since the start of the 90s, every time I see a badly put together document or powerpoint by somebody 'who doesn't know' about logos or graphics, and they distort the image/logo to 'fit' a particular shape - I cringe.

    It's totally up to you, the developer, if you want to publish an app that distorts your graphics. But I liken it to the office secretary trying to fill that entire screen with the logo. Just because the space is there.

    Personally I'd prefer the extra space to simply put extra wallpaper or screen background art.

    I've been reading some of these threads, and a lot of people seem to think that a square 'should' be able to fit a rectangle. ei. ipad fit an iphone. No it doesn't - different shape people.

    You either go with crop/letterbox and present your graphics the way you designed it (hey, black bars are fine) or go with camera tricks and distort them. And yes more people than you think will recognise a stretched screen.
  • carlblanchetcarlblanchet Member Posts: 755
    Great tutorial! Thanks!
  • ChirpinGamesChirpinGames Member, PRO Posts: 214
    @DeepBlueApps.com heres an example file using your template, if you go to iphone and then hit pause you can see what I'm talking about... do you think thered be a way to fix this?

    Thanks for making the template though!
    https://dl.dropbox.com/u/5079681/Bug_Example.zip
  • POMPOM Member Posts: 2,599
    edited February 2013
    Just to reduce confusion if things dont work for ya and you wonder why :

    Found another thing worth mentioning,
    If you preview the game in ipad mode for example, then the value of the attribute
    "screen.size.width" will be 1024 right? , and when dealing with universal builds you mostly rely on this value cause you move stuff around and manipulating the camera and on and on.. based on this value.

    BUT, if you preview this same ipad project on 50% preview mode, it will register the value of the "screen.size.width" to 512 instead of 1024, and this breaks your rules and can drive one crazy ;)

    photo ipad-screen-size_zps6df37346.png

    So stay on 100% when using the viewer..

    Cheers
    Roy.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271
    Just to reduce confusion if things dont work for ya and you wonder why :

    Found another thing worth mentioning,
    If you preview the game in ipad mode for example, then the value of the attribute
    "screen.size.width" will be 1024 right? , and when dealing with universal builds you mostly rely on this value cause you move stuff around and manipulating the camera and on and on.. based on this value.

    BUT, if you preview this same ipad project on 50% preview mode, it will register the value of the "screen.size.width" to 512 instead of 1024, and this breaks your rules and can drive one crazy ;)

    photo ipad-screen-size_zps6df37346.png

    So stay on 100% when using the viewer..

    Cheers
    Roy.
    Yep, I noticed that too
  • FlamingbananaFlamingbanana Member, PRO Posts: 90
    Is there a way to do this without stretching the iPhone 5 screen to where you would have the black bars on the sides (landscape)? That would be really helpful.

    P.S. I found that -14 for the iPhone 4s camera offset works better in landscape (at least in my game)
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited February 2013
    If you want a not so stretched iphone 5 but still better than letterbox from an ipad project try...

    Changing camera Height to 1024 camera Width to 1280 and Camera Origin X and Y to -128

    The good thing about this is you can still place actors on the outer region unlike the current letterbox.

    You would still build for crop in the publishing area.

    Darren.
  • FlamingbananaFlamingbanana Member, PRO Posts: 90
    @DeepBlueApps.com Thanks! I'll test it out later today :D
  • jdgouldjdgould Member, PRO Posts: 114
    Everything worked perfectly... except for scenes where I adjusted the height of the scene area to be greater than 768 (iPad Landscape). If I am previewing my iPad build as an iPhone, everything works until I get to a scene where I adjusted the height? All of the images get adjusted down about 30 pixels? Has anyone else had this type of experience? I have played around with various origin offset, etc... to try and counter for this adjustment but nothing seemed to work. If I turn of the controller all together, it almost looks normal, but that doesn't seem right.

    If anyone has any ideas, that would be great, i will try and post some screenshots.

    Thanks...
  • 8bitninja8bitninja Member Posts: 367
    I realize the UB is for iOS only but can this method be used for all gamesalad's supported devices? If so, if someone were to post a list of this methods dimensions for all those devices, that person would be the most amazing individual to ever grace these forums.
    Just saying :)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Any advice on iPad to kindle fire and camera size?
  • JSprojectJSproject Member Posts: 730
    edited February 2013
    @DeepBlueApps.com / Darren - thanks for yet another very helpful tutorial :). Just tested this out myself and it works very nicely unless the device is rotated, then the camera offset rules breaks. There is a very easy fix for that though, just replace the two "change attribute" with "constrain attribute" (2:06 in the video). Tested via adhoc.
  • FlamingbananaFlamingbanana Member, PRO Posts: 90
    @jdgould I'm working with the same thing. I found that a Camera.Orgin.Y offset -14 works for the iPhone 4s and then -128 for iPhone 5. Hope that helps :)

    -Tad
  • neomanneoman Member, BASIC Posts: 826
    Cheers .. Thank you very much ;-)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited February 2013
    Can't seem to push the Y camera orgin into - numbers Kindle Fire is a bitch. Trying to scale down from iPad.
  • 8bitninja8bitninja Member Posts: 367
    Yeah, thanks a lot Darren, this is awesome! A little adjusting of origin and works great.
  • jdgouldjdgould Member, PRO Posts: 114
    @flamingbanana thanks Tad. I realized that on the scenes where it wasn't working, I needed to check the box for Scrollable Background. Once I checked the box, it worked perfectly.
  • UtopianGamesUtopianGames Member Posts: 5,692
    @jdgould You can have a none scrollable layer (for a HUD for e.g.) but you will have to move the actors up 46 or 128 (see screenshot on page 1 of this thread).

    Darren.
  • UtopianGamesUtopianGames Member Posts: 5,692
    After spending several hours i have managed to get our new rotating dungeon game to work nice if the user rotates the device during play..my fault messing with the camera rotation but didn't think it would be this bloody hard lol...back to it.

    Darren.
  • beefy_clyrobeefy_clyro Member Posts: 5,390
    Any solution for the pause screens? Sounds a bit of a nightmare with your dungeon game but glad you got something.
    Out of interest, do you know if Wayne plans to make a tool for this?
  • UtopianGamesUtopianGames Member Posts: 5,692
    Were talking about a tool but as it's unclear when the new engine is out we dont want to sink too much time into it if its just around the corner.

    I didn't use the gs pause for this so not played around with that sorry.

    Darren.
  • WingmanappsWingmanapps Member Posts: 458
    I have problem with UB. It works Like a charm until i rotate my phone from horisontal to horisontal. My whole scene goes down and does not center until a new scene is activated. Any suggestions?
  • UtopianGamesUtopianGames Member Posts: 5,692
    Constrain the origin y will sort it out.

    You could also make a rule to check if the device has been rotated if you don't want a constant constrain.

    Darren.
  • 0belisk0belisk PRO Posts: 189
    I am having the same issue also, that when using the gs pause function the scene camera origin.Y resetting, tried constraining it and it doesnt move the screen back until the game has been unpaused.

    my pause scene is partically transparent, making the temporal black bar visible :S !
  • LumpAppsLumpApps Member Posts: 2,880
    edited February 2013
    .

    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

    Darren.
    A change attribute change self.position.y to self.position.y + 46 (or 128) can be used as a custom behavior and saves a little work.
  • DenimSharkDenimShark Member Posts: 192
    posted this awhile back somewhere but for those still struggling with the pause there is a general workaround in the video:
  • G.A.S.P.IndustriesG.A.S.P.Industries Member, PRO Posts: 25
    Thanks for this! I also need help with the pause screen if anyone has any ideas on how to solve that problem. Everything else works great, Thanks Darren.
  • RD2012RD2012 Member, PRO Posts: 45
    @fryingbaconstudios did you ever figure out the iPad to Kindle conversion? I'm trying to do the same. Any advice would be much appreciated!
  • DenimSharkDenimShark Member Posts: 192
    @fryingbaconstudios did you ever figure out the iPad to Kindle conversion? I'm trying to do the same. Any advice would be much appreciated!
    The template I have on the marketplace will convert to Kindle, Nook or any other device it is run on.

Sign In or Register to comment.