My Universal Binary Overscan Secret Weapon

13»

Comments

  • colandercolander Member Posts: 1,610
    edited February 2016

    @strag I haven't fully tested Lovejoy's formula but game.Display.Size.Height might be a better choice as it is the height measurement of the display the game is written in, in this case iPad. If you don't get the same results without this bit of code just experiment with it.

    The min() max() combo is a handy little equation which can be used in lots of situations. They just pick the min or max of two numbers. In this configuration it will always be 1 or -1 which multiplies the remainder of the formula changing it to either a positive or negative so you don't have to hard code it each time.

  • RedRoboRedRobo Member, PRO Posts: 682

    @colander
    Just been testing this on a portrait build and it's working fine: Self.Position.X+max(min(game.Screen.Size.Width/2-Self.Position.X,1),-1)*abs((((game.Screen.Size.Width *1024)/game.Screen.Size.Height)-768)/2)

  • paulkerrypaulkerry Member, PRO Posts: 25

    hi guys this formula works very good, the only problem i have is on Android when I first start up my game the positioning doesn't work but when i click to the level select menu of the game and then go back to the main screen it works fine its only literally on the start up only ever other scene no issues. any ideas on how to fix this for android?

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    @paulkerry said:
    hi guys this formula works very good, the only problem i have is on Android when I first start up my game the positioning doesn't work but when i click to the level select menu of the game and then go back to the main screen it works fine its only literally on the start up only ever other scene no issues. any ideas on how to fix this for android?

    Gamesalad is a bit slow to detect screen size on Android. You can fix this by switching from "change attribute" to "constrain attribute" and changing the self.position Y in the expression to the Y position that you have placed the actor on the scene.

    Mental Donkey Games
    Website - Facebook - Twitter

  • paulkerrypaulkerry Member, PRO Posts: 25

    Hi thanks for the reply what do you mean by the second part of your comment with the position Y change? also can this formula also adjust for Ad banners?

  • MentalDonkeyGamesMentalDonkeyGames Member Posts: 1,276

    @paulkerry said:
    Hi thanks for the reply what do you mean by the second part of your comment with the position Y change? also can this formula also adjust for Ad banners?

    In the expression, theres an attribute self.position Y. Replace that with the actual position that the actor is placed on the scene. For example: if the actors Y position on the scene is 650, put 650 in the place of self.position Y in the expression.

    Ad banners always display at the very top, or very bottom of the screen.

    Mental Donkey Games
    Website - Facebook - Twitter

Sign In or Register to comment.