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

2

Comments

  • BBEnkBBEnk Member Posts: 1,764

    @beefy_clyro said:
    Do you have Skype?

    No I don't.

  • beefy_clyrobeefy_clyro Member Posts: 5,390

    Ok, after adding offset, what is the /2 for?

  • BBEnkBBEnk Member Posts: 1,764
    edited September 2014

    somethings need to move the full offset others just half, it's something you just test.

    I use /2 because most things only need to move half but a jump button in right corner needs to move full offset.

  • beefy_clyrobeefy_clyro Member Posts: 5,390

    Problem is, its on one scene, every level .. so an actor can be positioned at say 50 and then in the next level is positioned at 450 …. how do you deal with that?

  • BBEnkBBEnk Member Posts: 1,764

    @beefy_clyro said:

    Problem is, its on one scene, every level .. so an actor can be positioned at say 50 and then in the next level is positioned at 450 …. how do you deal with that?

    if there both are reading tables they will both move right the distance of offset/2 thats all, Your only making the scene wider with camSize and offset keeps Actors centered.

    In my game "Bump,n Balls" there are 90 boards and I set up a test board so I could cycle them and see what went where with offset and I did have to make a change to 3-4 boards because the offset caused a slight issue.

    I never said it was perfect,lol.

  • beefy_clyrobeefy_clyro Member Posts: 5,390
    edited September 2014

    Haha no worries. I'm going to give it a go and see how it plays out.

    Any idea why I'm losing screen estate? I am resetting each time I change 'device'

  • BBEnkBBEnk Member Posts: 1,764

    @beefy_clyro‌

    Aww that sucks, it's because scaling from iP5 the ratio is going smaller unlike iPad which gets bigger. so your loosing 88 pixels on iP4 and 141 on iPad. unlike going from iPad you gain size.

  • pHghostpHghost London, UKMember Posts: 2,342

    @beefy_clyro‌ -- I can try and help, I sent you a PM.

  • BBEnkBBEnk Member Posts: 1,764

    @beefy_clyro‌

    Of course you could rearrange your level select to fit.

  • bluetractorjtbluetractorjt Member Posts: 14

    Ok, I have tried Colander's method and it worked great after I applied offset. Everything sizes down perfectly.

    However, the offset affected my rotating aiming arrow the user uses to launch a ball with. The arrow is pointing to the left where the offset origin has moved. I'm using vectorToAngle code for my aiming arrow and the code is this....

    vectorToAngle( game.ballX - game.Mouse.Position.X , game.ballY - game.Mouse.Position.Y )

    The aiming arrow spawns when the user taps on a ball to launch btw.

  • BBEnkBBEnk Member Posts: 1,764

    @bluetractorjt‌

    The universal app file you posted in @colander‌ thread is actual @pHghost‌ way of doing a universal app but I took a look at it and was able to rework it for you my way but slightly different for your game. I also made a few changes to your app and where ever I did I put a smily face so you could see.

    I also made a change to your boundaries you were using your platforms to create a wall I changed them to a separate wall actor it's really easier to keep things different plus they need to adjust to different device sizes. you will notice what I did right away "Big Red Walls". you can adjust them I just made them so you would see them.

    you will need to make your background wider so it will fit all screen sizes I recommend at least 1366 and theres a rule in there that will make it always center itself to camera.

    be sure to look at your resizer to see what I did there also in your actors I added one change attribute to them, a simple "change position.x to position.x + offset/2".

    Your ball was really the trouble maker because you spawn it after every death, So I have it set its position at start + offset if any, and then it resets Ballx - offset at death as to not keep adding more offset to ball after each death.

    good luck with game.

  • bluetractorjtbluetractorjt Member Posts: 14

    @BBEnk, this is amazing!!!! Thank you so much for doing this. I went and examined what you did and it really makes so much more sense than the way I was doing it. If you ever need some illustration/artwork, just pm me and I'll hook it up. Thanks again! @colander, thank you for your help and for taking a look at it as well. The GameSalad game community is the best out there in my opinion.

  • BBEnkBBEnk Member Posts: 1,764

    I just want to mention that there is a Bug in Android at start were it want detect device display size, So it want set things up correctly.
    The simple fix is to just to put the change attributes on the first scene that detect display size in a loop rule that says if self time => then 0 then loop that solves it and will cause zero issues now or after they fix you can leave it.

    This has happened before in Gamesalad so you can leave it like this and this will future proof it in case issue pops up again.

    And this is only necessary on the first scene that detects display size and sets up the attributes, put them all in the loop.

    I've already summited a bug report for this here, and looks to be confirmed.

    http://bugs.gamesalad.com/show_bug.cgi?id=384

    heres a demo with loop example notice only the first scene has the loop the second scene or others don't need it because there feed off the attributes,You could also you constrains but loop is easy enough.

  • colandercolander Member Posts: 1,610

    I use a black image for the custom loading image on the publishing portal and have loading scene with a two second timer to switch scenes to the landing scene as suggested by @jonmulcahy and this solved two problems. The one you described and the lousy job the custom image display does on the various Android devices. To be fair it is probably impossible to do that anyway, there are just too many devices with varying Android systems.

    I haven't uploaded a build with RC 0.12.9 so I can't say if it still works. Before I started doing this that bug was always there I don't think it was ever fixed.

  • BBEnkBBEnk Member Posts: 1,764

    No it was fixed because I reported it before but now it's been back, and I do use a white image for my custom loading image and my first scene is my real splash screen which also sets up my attributes for game, before main menu. Anyway loop or a constrain solves problem either way now or future.

  • colandercolander Member Posts: 1,610
    edited October 2014

    I just did a test on an Android phone and it is working. One thing I noticed in your last post you had your attributes in the loading scene they need to be in your main menu/landing scene. The only thing in the loading scene is the scene change wrapped in a timer.

    Can you try it on your devices and report back I would like to know. I will have access to a tablet later to day and I will test it again too to see if it is still working.

  • BBEnkBBEnk Member Posts: 1,764

    Well a display text will detect the correct device display size but for some reason a change attribute want.
    and I want my attribute on the loading screen and the loop fixes my issue and causes no problems after all it's only read once.

    So if you create a attribute called camSize and have a change attribute that says change camSize attribute to display size it will actually change that attribute camSize to what ever size you built game in.

    So if you have two display text the one that checks display size will be correct, but the one checking camSize will be wrong assuming the device your testing on has a different resolution then what you built with in creator

    So my Phone has a resolution of 960x540 and when I run test below display device test says 960 but camSize say 1024 which is what I built test in, and thats the issue I fixed with a loop.

    Because for some reason change attribute gets the wrong one, heres a simply test you can try on your device.

  • BBEnkBBEnk Member Posts: 1,764

    heres the APK for above save you some time.

  • colandercolander Member Posts: 1,610

    I have to go out for a few hours I will have a look when I get back. Can you test the system I describes earlier?

    1. Loading scene with change scene wrapped in a 2 second timer
    2. Landing scene/main menu with change attributes only (No timers, loops, etc)

    I only have one android device and access to one tablet both are poor quality. This system works fine on both.

    For some reason on the first scene GS won't read the change attributes as you have said. But if I go to another scene and back they start working. I get around this by having a loading scene and then going to then landing scene and it works on the devices I have tested.

    I would be a big help if you could test it in your game on your devices. As far as I know @jonmulcahy‌ has been using it for a long time and it should still work on all devices. It is a good system so simple to do and kills two birds with one stone.

  • BBEnkBBEnk Member Posts: 1,764
    edited October 2014

    Ok I tested what you said:

    Loading scene with change scene wrapped in a 2 second timer

    Landing scene/main menu with change attributes only (No timers, loops, etc)

    the test above did pickup display size and setup everything correctly on second scene no loops or timers.

    So issue is just first scene not reading change attributes correctly or should I say not getting device display size on startup, but will after scene change.

    But scene one can be fixed by using either a constrain attribute or a loop.

    So you can do it either way.

  • colandercolander Member Posts: 1,610

    Thanks for that and I checked out your code it works fine, so yes either way is good.

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    @BBEnk does this template with portrait orientation?

  • BBEnkBBEnk Member Posts: 1,764

    @MattButlerStudios‌

    Yes and there's a portrait template on page one,just scroll down a bit it says portrait in the name.

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    @BBEnk‌
    Wow, I am sorry. I must have went right past it. Thanks for the UB!

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    @BBEnk‌ Also, if I were to use this with iPad portrait would I just change the numbers or would there be an entirely different method?

  • BBEnkBBEnk Member Posts: 1,764

    @MattButlerStudios said:

    BBEnk‌ Also, if I were to use this with iPad portrait would I just change the numbers or would there be an entirely different method?

    Oh my bad I forgot it was iPhone5 version, but yes just change the numbers 320 to 768 and 568 to 1024 and thats it..but heres a iPad portrait version to save you the trouble and you can see better how it works.

    notice nothing at bottom need to change position only above and even then only the score text really has to change.

  • BBEnkBBEnk Member Posts: 1,764

    So I finally got a Mic "note PS3 USB chat mic works perfect on mini Mac 19 dollars at wal-mart" anyway I made a video on how to make your apps Universal.

    This is my first video tutorial so I might ramble a bit trying to explain things but let me know, hope it helps.

  • LovejoyLovejoy Member Posts: 2,078

    @BBEnk said:
    So I finally got a Mic "note PS3 USB chat mic works perfect on mini Mac 19 dollars at wal-mart" anyway I made a video on how to make your apps Universal.

    This is my first video tutorial so I might ramble a bit trying to explain things but let me know, hope it helps.

    Great video!

    Fortuna Infortuna Forti Una

Sign In or Register to comment.