Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Probably a really easy one this but I've yet to implement anything with basic movement...
On the title screen I have a character that starts off screen (at -50, 55) and walks on screen (to 15, 55).
What events or behaviours etc do I need to implement this?
Thanks all :)
Develop games in your browser. Powerful, performant & highly capable.
Depends on what you want this movement to look like.
If you just need constant speed, you can do this without any behaviors:
On every tick
Character X<15 : Character move N*dt pixels
You can use lerp (very fast start, slows down as it gets closer to position):
Character set X to lerp(self.x, 15, dt)
Or try the new Tween behavior in C3 runtime, with it you can make different cool effects - acceleration, deceleration, bounce, etc.
You can use lerp in a different way as well to do the motion at a constant speed.
You can do it with a t variable.
— set t to min(1, t+dt/duation)
— set x to lerp(startx, endx, t)
— set y to lerp(starty, endy, t)
It will move from a start position to an end position in “duration” seconds.
Basically that’s what the easing behaviors do.