Methods of movement

You must understand the Game Editor concepts, before post here.

Methods of movement

Postby motorollin » Sat Aug 18, 2007 10:20 am

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!
motorollin
 
Posts: 54
Joined: Sun Aug 12, 2007 8:05 am
Score: 1 Give a positive score

Re: Methods of movement

Postby Troodon » Mon Nov 12, 2007 8:21 pm

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. :)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Methods of movement

Postby Kalladdolf » Thu Nov 22, 2007 5:10 pm

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.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest