...Tween UI and Anchor it at the same time.

0 favourites
  • 5 posts
From the Asset Store
Calculate parabolic trajectories and tween objects over them.
  • Cheers folks my problem:

    Anchor behaviour is great! Allows me to make very scalable games with scale outer that will work virtually on ANY device. Its incredible.

    However right now I need to level up my game visual side and add tweens for lets say button that comes from offscreen to somewhere on screen. How should I approach this if I want to keep with using anchor goodness.

    There are multiplie issues im foreseeing but really it would be great to hear opinions and maybe find some solution with brainstorming here. You can also describe how you approach creating complex user interfaces in your games or prototypes.

  • If I think I understand you correctly you could this plugin from Rex Rainbow


    Easy to configure and you wont need to tween. Next, check out this video tutorial by ArcadeED


    It will give you some ideas on how approach your safe zone when the screen is resizing.

    I'm working on a game where the HUD stretches to with the dimensions of the device and I have a touch panel that slides out with buttons. Likewise, I have elements that are anchored.

    You can see my games screen shots here http://www.neoprofessor.com/html/final_contact.html and notice that the HUD is stretched versus the video that's recorded on the desktop. Notice on the left side, there is the edge of the panel that when touched, pop out with buttons on it. You don't see screen shots of it but, I think you'll get the general idea.

    Like everything else you need to experiment and find X and Y coordinates that will work for your game and you don't necessarily need to anchor it.

    Maybe I'm misunderstanding you but, hopes this helps.

    Good Luck

  • This may or may not help but, this is one thing I have done.

    Instead of anchoring UI items to my window, I place all UI items on a single layer. I then set the layer paralax to 0,0. This makes it so the layer does not move at all when scrolling. When the layer loads, I set the starting position of elements I want to move, relative to the layer size. I have attached a very simple example capx to show you how it works. If you press esc, a text object will drop down from above the screen. Also, there is a bottom bar with a button that will make it expand and contract. The graphics look terrible because I just wanted to throw together a quick example but, you should be able to see how it works. Also, the only thing that is anchored is the box in the upper right but it really doesn't need to be.

    This may not be as flexible or even as good a method as what TheDom suggested, but it is a method I have used that worked well for me.

    I hope this helps you work out some new ideas on how to handle this situation and good luck with your project.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Actually, that's exactly what I do in my above example and should have pointed that out. My HUD is on a separate layer and the parallax is set to 0,0 however it does stretch by anchoring when the device dimensions change (width) which in this case is mostly the width since it's a landscape based game. And nice sample for those who read this post. Thanks for sharing that

  • Cheers folks I just wrote my own anchoring.

    Sure your solutions are okay but im using scale outer and im extremely OCD about quality and proper ui layouts and I dont want to use unbounded scrolling in most games.

    Anyway topics closed pretty much, thanks for posting your opinions they gave me something to think on and get going with my own implementation.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)