Readdressing jerky walking issues...

Started by Bandersnatch, Thu 24/01/2013 17:13:05

Previous topic - Next topic

Bandersnatch

Good evening AGSers,

Ages ago I brought up a question about my character walking choppily and snagging against the edges of walkable areas. I'm well aware that this is not the fault of the areas being too small or anything like that. I started a new project today and my player character still moves a little awkwardly - it seems to be whenever she turns a corner, there's a split second snag before she moves and it looks uuuuugly.

Is this just a universal issue AGS has or is there a setting I've overlooked?

Slasher

I read your earlier post.

With a small Walkable area that runs horizontal and then turns down 90 degrees there is no jerk or pause that you mentioned in any of my games. I think the problem lays elsewhere, perhaps?

I can only suggest you check all the characters views are correct and each loop is correct (Down, Left, Right, Up).

As Khris mentioned, Walkable areas need to be over 3 pixels.

Also, do you have a curved or straight turning?






Bandersnatch

Curved or straight turning...is that a setting in the editor?

Slasher

Not as far as I know, but you can add other loops to the characters view, like walking diagonally.

in the character views the first 4 loops are normal walks: D,L,R,U. Other loops can be used for diagonal walking etc.

The character should walk along the Walkable area and turn without any pauses, especially if character is set to walk eBlock. It won't stop until it's reached its destination, you have to script this yourself, else will only walk as far as the pathfinder length (not sure on walk length, maybe 300pxs?), ie character stops and you will have you click walk again.

Either way it should walk smoothly.

Check all your view images as some might be out of line and cause to walk jerkingly.

One of the top guns here may offer better advice.








Bandersnatch

Just have to keep checking I guess.

Also I might as well post in this thread rather than starting a new one - do you have any issues disabling Walkable Areas? I've used the RemoveWalkableArea code in my room script but it's not doing anything.

Slasher

EXAMPLE:


Code: AGS

//Turn off
RemoveWalkableArea(2); // when you want to Disable walkable area 2 (Use whatever number it is.)

//Turn back on:

RestoreWalkableArea(2); // when you want to Enable walkable area 2 (Use whatever number it is.)


This is how it is suppose to be in the script.

If this fails to work post the code you have for that room.



Khris

If RemoveWalkableArea() doesn't do anything, it's a user error. The command will work if used correctly.
Double-check that you're editing walkable areas, not regions or other areas. Double-check that the command is actually called by putting a Display("disabling wa now"); call next to it. Make sure your character walks only on walkable areas, try hitting Ctrl-A during the game, etc. There's a mistake somewhere and you'll find it sooner or later.

Regarding jerky walking, it's not something you can do much about; except for using your own pathfinding. You can try turning MovementLinkedToAnimation off for the character, but you'll also have to decrease the movement speed accordingly (not the animation speed).
(Movement speed is the amount in pixels the character will move whenever the frame is changed; turning that option off will move them every game loop, not every third or forth one.)

Bandersnatch

Found out about the RemoveWalkableArea problem. Total schoolboy error, typing straight into room script without linking properly.

As for the jerky walking, it is just a pathfinder thing. I'll probably try and look into it later but for now I'd rather get a functioning tech demo up and running before getting into the finer details.

Many thanks guys, more annoying questions on the way!

SMF spam blocked by CleanTalk