Best option to move with easing (+request)

Get help using Construct 2

Post » Mon Oct 31, 2011 8:17 pm

Hi folks!

I'm about to finish my game (must be 100% complete on Wednesday!) so now I'm working on the menus.

I wanted the menu items - Logo, "Play", "About" - to enter the screen one at a time, and I wanted them to enter and decelerate when reaching their final position. I'm wondering what's the best way to do it! What do you guys think?



Also, I'd like to propose a "Move To" behavior, where you could enter the destination coordinates for the sprite, along with the period and the type of easing, and it would go there. I've seen this being added on all major game frameworks (Flash, Unity and Cocos2d, for example) and it helps A LOT. Would that be possible - or even discussable?

I once had to find the easing formulas when a friend of mine was trying to implement, so I have them right here: http://www.robertpenner.com/easing/
And you can check the types of easing here: http://hosted.zeh.com.br/mctween/animationtypes.html

Cheers!gammabeam2011-10-31 20:21:21
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Mon Oct 31, 2011 8:23 pm

I used in my menus, things like mouse over(wait 1sec) mouse not over. Active animation.
B
203
S
37
G
13
Posts: 136
Reputation: 29,523

Post » Mon Oct 31, 2011 9:28 pm

Hmmmm I'm not sure I follow you... What do you mean by that?

When I come back home from work I'm gonna try the custom movement behavior...
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Mon Oct 31, 2011 9:48 pm

@gammabeam
You can customize your sprite paths as well, just make a group of codes and the conditions with the formulas.
All of that paths can be done by this way.

Start doing simple paths like circles, updating the path every tick, and keep it doing ellipses, etc.

The formulas you said you have. So, post a formula here and, if necessary, I can help you doing a sample.

Oh, and also, if it's not your problem, Yeah, it'll be great.TELLES08082011-10-31 21:49:49
ImageImageImageImageImageImage
B
93
S
20
G
13
Posts: 1,215
Reputation: 18,990

Post » Mon Oct 31, 2011 10:29 pm

+>object.variable =1
-> object set x to lerp(object.x,destinationx,0.5*dt)
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Mon Oct 31, 2011 11:20 pm

[QUOTE=newt] +>object.variable =1
-> object set x to lerp(object.x,destinationx,0.5*dt) [/QUOTE]

Wow! I totally forgot about the LERP! Thanks Newt!

Still, ain't the Move To a good idea?
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Tue Nov 01, 2011 4:56 am

I think rex rainbow did such a behavior.
Check the "Plugins for C2" forum.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Tue Nov 01, 2011 10:37 am

excuse, but what is LERP? and where we Can learn more about this Easter eggs?
ImageImageImageImageImageImage
B
93
S
20
G
13
Posts: 1,215
Reputation: 18,990

Post » Tue Nov 01, 2011 10:54 am

[excuse, but what is LERP? and where we Can learn more about this Easter eggs?

thank for this question. I asked myself the same. vidi2011-11-01 10:56:21
B
21
S
5
G
5
Posts: 163
Reputation: 5,028

Post » Tue Nov 01, 2011 12:00 pm

You can find more about LERP:HERE

Wow, didn't know about the Move To plugin!
I have to start lurking around that section! Thanks Kyatric!gammabeam2011-11-01 12:40:02
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Next

Return to How do I....?

Who is online

Users browsing this forum: BACLog, Kagubro and 17 guests