sprite tweening and responsive design?

Get help using Construct 2

Post » Fri May 05, 2017 9:17 am

Hey there!

If i want to anchor a sprite for excample in an edge of the layer, there is no possability to tween them (for excample with tweenLite).

I tried to deactivate the anchor behaviour and tween the sprite after i activate the anchor behaviour again but i get weird offsets...

I need the anchor behaviour because i need a responsive design - on the other hand i need to tween the sprites at the beginning of an layout...

Has someone an idea how to fix this problem or a workaround?


Thank you very much!
B
9
S
2
Posts: 147
Reputation: 1,041

Post » Sun May 07, 2017 6:08 pm

Someone?
B
9
S
2
Posts: 147
Reputation: 1,041

Post » Mon May 08, 2017 2:35 am

You shouldn't need to use anchor for any responsive design... you can set the X/Y coordinates at runtime for every object in your layout.

I made an example project with a fully responsive layout that resets it's scale to the resolution/window size of the browser, for any device.

The example is HERE - maybe it will be helpful to what you're trying to do :)

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474

Post » Mon May 08, 2017 7:07 am

@SoldjahBoy

Thank you very much for your answer! And for your Capx - If i make this with "every thick" event - does the project has a higher performance cost, than with anchor?

Or could i use this for any gui and ingame elements in my game without losing performance?

Thank you very much for your answer!
B
9
S
2
Posts: 147
Reputation: 1,041

Post » Mon May 08, 2017 7:24 am

The performance impact should be minimal but it will depend also on how many objects you have on the layout as well as complex movement of said objects. I have used this method for a few projects so far with zero noticable impact on performance.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
83
S
34
G
40
Posts: 3,032
Reputation: 30,474


Return to How do I....?

Who is online

Users browsing this forum: Kin and 38 guests