Character skips

Started by Oz, Wed 04/08/2004 01:55:50

Previous topic - Next topic

Oz

I click "walk to" and the character starts walking. All's well, looks good, etc, but just as the character is about to stop (before it switches to frame 0) it skips (jumps) a few pixels to reach it's final x/y destination. This seems to happen at random. What is causing this? Nothing wrong with the animation frames...
Diversity is divine!

Radiant

Actually that happens with me as well, partticularly with objects. My guess is that it is a frameskip that occurs because your computer is relatively slow. What CPU speed do you have?

jrl2222

#2
It happens on mine sometimes. Not very often though.
I certainly hope it's not that my computer is to slow.

Asus P4P800VM MoBo
Intel P4 2.6GHzÃ,  w/ H-T Processor
512Ã,  PC3200 Corsair Memory
120 gig 8mb buffer 7200 rpm Hard Drive
Nvidia GeForce 64mb AGP
Win XP pro


Radiant

Hm, I'm running on 350 MHz here and that might just qualify as slow, but 2.6 GHz certainly doesn't.
Okay, anyone else got an idea? I've posted the same thing as a bug report once, with objects snapping to their destination in the last 25% of their movement traject, but nobody else seems to have that problem. I can't even blame it on windows since jrl2222 is running a different win version...

jrl2222

Well it's not like I get it all the time I have just noticed it a few times while testing my game. To be honest I am still pretty new around these parts and just figured it was a flaw in my coding somehow.
I play with it on my laptop tonight or tomorrow and see if I can recreate it on that. That's a 700 MHz running Win98se, 128 Meg mem. it should happen more frequent on the laptop(in theory).

Oz

I don't think it has anything to do with comp speed, must be something else. But like you say, it seems like the character skips a frame and "jumps" to reach its destination.
Diversity is divine!

Darth Mandarb

As I understand it:

When the character stands still (not moving or when it stops moving) it uses the first frame in the loop (of the direction it's facing).  If where the character stops moving happens to be on the middle frames of the loop it skips back to the first frame.  This leads to that 'skip' that you're seeing.

I think that's what is causing this.

Oz

Quote from: Darth Mandarb on Wed 04/08/2004 19:31:11
As I understand it:

When the character stands still (not moving or when it stops moving) it uses the first frame in the loop (of the direction it's facing).Ã,  If where the character stops moving happens to be on the middle frames of the loop it skips back to the first frame.Ã,  This leads to that 'skip' that you're seeing.

I think that's what is causing this.

Yep! Could very well be it, because it doesn't happen all the time. Hmmm. The engine should make sure that an animation cycle is completed before switching to frame 0. On the other hand, this would make the character "moonwalk" on the spot if the cycle isn't completed before it reaches its destination... ???
Diversity is divine!

Babar

are you sure all your seperate sprites for the animation are lined up together? If the position of the character has even a pixel difference, it can sometimes show up as a skip
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

Oz

I'm pretty sure. But I used "Quick Import FLC" to import the frames from an FLC animation. I'll try importing single images instead and see if I get the same result.
Diversity is divine!

Radiant

Quote from: Darth Mandarb on Wed 04/08/2004 19:31:11
As I understand it:

When the character stands still (not moving or when it stops moving) it uses the first frame in the loop (of the direction it's facing).  If where the character stops moving happens to be on the middle frames of the loop it skips back to the first frame.  This leads to that 'skip' that you're seeing.

No, that's not what I mean. If I do a SetObjectPosition (0, 10, 10), then MoveObject (0, 200, 10),
what happens is that the object moves visually to about 150,10, then instantly snaps to its destination. Or sometimes it snaps to 50,10 and then starts moving visually.
Ditto for characters. Only it's a heisenbug.
it feels like a frameskip, anyway.

Oz

Quote from: Radiant on Thu 05/08/2004 14:33:03
Quote from: Darth Mandarb on Wed 04/08/2004 19:31:11
As I understand it:

When the character stands still (not moving or when it stops moving) it uses the first frame in the loop (of the direction it's facing).Ã,  If where the character stops moving happens to be on the middle frames of the loop it skips back to the first frame.Ã,  This leads to that 'skip' that you're seeing.

No, that's not what I mean. If I do a SetObjectPosition (0, 10, 10), then MoveObject (0, 200, 10),
what happens is that the object moves visually to about 150,10, then instantly snaps to its destination. Or sometimes it snaps to 50,10 and then starts moving visually.
Ditto for characters. Only it's a heisenbug.
it feels like a frameskip, anyway.


Yeah, that's basically what I'm experiencing too. Weird...
Diversity is divine!

Pumaman

If somebody could produce a little demo game that demonstrates this problem reliably, I'd be interested.

Radiant

Okay, this one does it all the time for me:
http://www.liacs.nl/~psimoons/snap_obj.zip

Specifically, when I start it, the letters come from the top and bottom just as they are supposed to, but their movement skips the last twenty pixels or so. E.g. the top one moves from y=0 to y=60, then instantly jumps to y=80.
HTH

Oz

Diversity is divine!

Pumaman

The problem appears to be worst when you're using Movement Speed 1, and the new version 2.62 beta 3 in the Technical Forum should solve it. Let me know if you continue to experience problems.

Oz

#16
Yay! No problems with "skipping" in the latest build. :)



Doh! Obviously I didn't test it carefully enough. The latest build still has problems with this...
I'm going to do some extensive testing and see if I can narrow it down a bit. It seems like it doesn't happen when you use MoveCharacter, only when you click to move the player around. Not 100% sure about this. I'll return when I have done some more testing.
Diversity is divine!

Oz

I think I've narrowed it down to mouse movement. It doesn't happen when you use any of the MoveCharacter commands. I've tried scripting a long chain of movement using MoveCharacterBlocking and after several test runs I have not seen a single skip occur, still the character skips when using the mouse to move him around.
Diversity is divine!

Lord Darth Starr

Hi guys

I all new to this indpendant A/games comunity and just downloaded the latest version +"demo quest" so I could get the just of the progeram and when I loaded demo quest my charactor dosent skip he jumps backwards across the screen plus my colors are dancing.

Scorpiorus

This is fixed for AGS2.62 which is at a beta stage. You can either download the latest beta or fix it manually by changing character's walking and animation speeds on the characters panel.
I'm not sure about the colour though. Try running in a defferent mode - 16bit (HiColor) and see if it helps at all.

SMF spam blocked by CleanTalk