GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Introducing iOS Universal Binaries

123457

Comments

  • OmenaboOmenabo Posts: 121Member
    I'm having the same problem. For some reason the scene always resets origin.y to 0 when run.
  • SlickZeroSlickZero Houston, TexasPosts: 2,870Member, Sous Chef
    edited February 2013
    This works great for a normal sized iPad 1024x768 scene, but I'm not able to get this to work with a scene that is oversized (3072x2579) and using a non-scrollable layer.

    Anybody else tried this on an oversized scene?

    I have no friends. I'm a loser that makes video games all day. Will you be my friend?

  • mrpacogpmrpacogp Posts: 400Member
    edited February 2013
    The solution for me is using rules to resize the scene in relation with the width of device
    And before that resize all scene to 2048 of width, if you dont do that, all actors near to old limits of scene could be destroyed.
    Darren have made a great project.
    I`m using a values from devices size instead of 480 or 568.
    I have to test it on more real devices, but at this time works on iphone 3gs, 4g, 5, and ipad 1 and 2.
    Its the same of resize to ipad techniques.
  • SlickZeroSlickZero Houston, TexasPosts: 2,870Member, Sous Chef
    edited February 2013
    Okay, if you have a project, and it uses an oversized scene, and you have UI elements that are on a non-scrollable layer, and you want it to work right with the new UB feature, you use the sizing rules posted here already for cropping, but you also have to put an offset in the UI elements that are on the non-scrollable layer, because they don't translate with the camera offset. And each individual element has to be scripted.

    For each UI element:
    create 2 actor attributes to track the self positions (x,y) of the element, for this example we'll name the attributes "StartX" and "StartY"

    From iPad to iPhone 5:
    Rule: If screen width=568 change attribute self.position.y to self.StartY+160 (Different values may be needed depending on the size of your UI element)

    From iPad to iPhone 4s and below:
    Rule: If screen width=480 change attribute self.position.y to self.StartY+80 (Different values may be needed depending on the size of your UI element)

    **You would need to do the same for any elements at the top of the screen as well with opposing values, if they are on a non-scrollable layer**

    Those numbers worked for offsetting my UI elements, but may need to be slightly altered to fit your specific project.

    Thanks to @tenrdrmer - He gets all the credit.

    I have no friends. I'm a loser that makes video games all day. Will you be my friend?

  • Braydon_SFXBraydon_SFX Posts: 9,103Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee
    Nice one, @SlickZero & @tenrdrmer.
  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    Thanks guys but to be fair I only worked out the iPhone 5 size on that project for him. @slickzero did the rest all on his own. :)

    It's not my fault I never learned to take responsibility for anything. ;)

  • SingleSparqSingleSparq Posts: 1,339Member
    @Tshirtbooth But will you like it? We await your comments O great one! :))

    Member since November 2009 :D
    Twitter: @SingleSparq Web: www.singlesparq.com

  • DenimSharkDenimShark Posts: 192Member
    Can someone please explain what exactly changing the platform in the project info tab actually does. It appears that its not just changing all the scene sizes and camera sizes to the particular platform. The simple change cam.size.height and cam.size.width to 768 and 1024 for example performs the stretch technique when changing the platform to iphone, but not with ipad platform selected and then manually changing to iphone in preview.
  • DenimSharkDenimShark Posts: 192Member
    Anyways I put together a video for those who are still having trouble:



  • beefy_clyrobeefy_clyro Posts: 5,390Member
  • SUMinteractiveSUMinteractive Posts: 49Member, PRO

    From an iPad landscape project with crop selected i used...

    If screen width=480 change camera height to 862 origin y to -46

    If screen width=568 change camera height to 1024 origin y to -128

    Hope this helps but i need to do some testing on devices to clarify.

    Darren.

    Ok. I'm missing the connection between the screen width, camera height, and origin. With this we can also stretch to fit on multiple android devices as well as kindle and nook.

    For example:
    The nexus 7 is 1280 x 800. So if Width = 1280 change camera height to X origin y to N

    How are you getting those numbers? Just testing? or is there a calculation for it?
  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    @SUMinteractive right now I believe it is based on testing. Though I've been playing with it a lot and I think the right math wiz could likely work this into an expression.

    Also android is not necessarily as big of a deal. its been my experience most android devices are on similar aspect ratios so while the screen size themselves are different using a letterbox setting is not a big issue as the letter boxing is normally tiny across those devices.

    It's not my fault I never learned to take responsibility for anything. ;)

  • DoguzDoguz Posts: 500Member
    @denimshark Awesome stuff. I like your solution very much.
  • AppTekAppTek Posts: 152Member
    edited February 2013

    Anyways I put together a video for those who are still having trouble:



    How did you get the y position for the crop marks in Gamesalad? Great vids!
  • DenimSharkDenimShark Posts: 192Member
    @AppTek just approximated them in the vid but you could calculate em using the offset attribute
  • jasonwilliamsjasonwilliams Posts: 11Member
    @DenimShark

    What is the px size of your adobe illustrator 16:9, 3:2 and 4:3 images in your videos???
  • Dazza006Dazza006 Posts: 248Member

    My game was originally made for iphone but I used our resizer to convert to iPad so without having a play I'm not sure on the numbers.

    Darren.

    @DeepBlueApps.com
    I have tried resizing my landscape iPhone project with your resize tool but can't get your technique to work.
    You say you used it on your project?
    could you help me get my iPhone project to universal build

    Darren.
  • DenimSharkDenimShark Posts: 192Member

    @DenimShark

    What is the px size of your adobe illustrator 16:9, 3:2 and 4:3 images in your videos???

    4:3 : 2048x1536
    3:2 : 2304x1536
    16:9 : 2732x1536
  • jasonwilliamsjasonwilliams Posts: 11Member
    @DenimShark

    iPad w. Retina = 2048-by-1536
    iPad = 1024-by-768
    iPad mini = 1024-by-768
    iPhone 5 = 1136-by-640
    iPhone 4 = 960-by-640

    So on the iPad w. Retina a 16:9 2732-by-1536 image will have 684 px chopped off? Which is 684/2= 342 px on left & right (when in landscape mode)? Simple math tells me same happens on iPad & mini as the screen is half the size of the iPad with Retina.

    But what happens to on the other screens (iP4&5) how much is cut off of the 16:9 2732-by-1536 image?
  • DenimSharkDenimShark Posts: 192Member
    None on iphone 5, 107 on iphone legacy and 171 on ipad
  • ChirpinGamesChirpinGames Posts: 214Member, PRO
    Omenabo said:

    I'm having the same problem. For some reason the scene always resets origin.y to 0 when run.

    @saladstraightshooter just wondering if the camera offset bug was being looked into, or is it not really a priority?

  • Yovanny369Yovanny369 Posts: 105Member
    I recently updated one of my games with UB and i noticed that Play Heaven doesnt work,i dont know if its just me or if someone else having this problem.

    Here the link of may game!

    https://itunes.apple.com/us/app/super-pong/id571366257?l=es&ls=1&mt=8

    Cheers!
  • DenimSharkDenimShark Posts: 192Member

    I recently updated one of my games with UB and i noticed that Play Heaven doesnt work,i dont know if its just me or if someone else having this problem.

    Here the link of may game!

    https://itunes.apple.com/us/app/super-pong/id571366257?l=es&ls=1&mt=8

    Cheers!

    Same problem. Should we expect a fix?
  • glyniusglynius Posts: 231Member
    Ok, i have a project based on ipad portrait, could i convert it to iphone, keep it cropped as ipad was, and add a bigger background picture to fill the black bars? is this possible?
  • JDuaneJJDuaneJ San Francisco Posts: 300Member
    very cool guys. I'm leaving my current apps as is, but will transition with future apps! This is exciting!
  • Braydon_SFXBraydon_SFX Posts: 9,103Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee
    Hey guys,

    Just leaving a file here for y'all. I saw someone asking for the numbers needed to get the UB working from iPhone instead of iPad. I apologize if this has already been solved. Sat down for a few minutes the other day and plugged in some numbers. Hope it helps.

  • Dazza006Dazza006 Posts: 248Member
    @Braydon_SFX
    This is great for my future projects but my project I have just finished (iPhone landscape project ) has scenes with control camera actors in, and I can't seem to get any of these techniques to work.
    -Darren
  • ChirpinGamesChirpinGames Posts: 214Member, PRO
    Does anybody know how to get the camera offset trick for universal builds to work with the camera control action for a platformer?
  • UltimateCreativesUltimateCreatives Posts: 27Member
    Hello every one.
    Solution made by DeepBlueApps and video presentes on gshelper seems to work great. But what if I am going to make a game only for iphones and my base platform is iPhone5 portrait? What kind of math should I use to make it work properly on iPhone 4 portrait?
  • Braydon_SFXBraydon_SFX Posts: 9,103Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee
    @UltimateCreatives - Try this one. :D

    This project was created initially for iPhone (Portrait) and converts to iPhone 5, iPad, etc
This discussion has been closed.