Page 1 of 1

Methods of movement

PostPosted: Sat Aug 18, 2007 10:20 am
by motorollin
Which is smoother/most efficient: moving by incrementing an actor's x/y co-ordinate, or by setting angle/directional velocity? I'm finding turning a bit jerky when using x+=5 or y+=5 to move my main actor, and I'm wondering whether changing over to angle/directional velocity will be smoother.

I did try changing to using angle/directional velocity, but I'm currently checking the x/y co-ordinate before moving to make sure the player doesn't exit the playfield. When using angle/directional velocity, you have to check the player's location using a timer or using collision to stop it before exiting the playfield, and I have found this to be a bit unreliable.

Any advice appreciated!

Re: Methods of movement

PostPosted: Mon Nov 12, 2007 8:21 pm
by Troodon
As my opinion, the xvelocity/yvelocity/angle movement are the smoothest ways. They also skip some pixels but no so much as x + 5 etc. :)

Re: Methods of movement

PostPosted: Thu Nov 22, 2007 5:10 pm
by Kalladdolf
if you use xvelocity and yvelocity, (as far as I know), you sure can do x/y/velocity plus angle and so on at the same time.