Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Oz on Wed 04/08/2004 01:55:50

Title: Character skips
Post by: Oz on Wed 04/08/2004 01:55:50
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...
Title: Re: Character skips
Post by: Radiant on Wed 04/08/2004 11:54:47
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?
Title: Re: Character skips
Post by: jrl2222 on Wed 04/08/2004 15:23:37
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

Title: Re: Character skips
Post by: Radiant on Wed 04/08/2004 16:14:00
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...
Title: Re: Character skips
Post by: jrl2222 on Wed 04/08/2004 16:49:20
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).
Title: Re: Character skips
Post by: Oz on Wed 04/08/2004 18:46:08
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.
Title: Re: Character skips
Post by: 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.
Title: Re: Character skips
Post by: Oz on Wed 04/08/2004 22:55:02
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... ???
Title: Re: Character skips
Post by: Babar on Wed 04/08/2004 23:53:34
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
Title: Re: Character skips
Post by: Oz on Thu 05/08/2004 00:08:27
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.
Title: Re: Character skips
Post by: 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.
Title: Re: Character skips
Post by: Oz on Thu 05/08/2004 16:31:06
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...
Title: Re: Character skips
Post by: Pumaman on Fri 06/08/2004 22:02:53
If somebody could produce a little demo game that demonstrates this problem reliably, I'd be interested.
Title: Re: Character skips
Post by: Radiant on Wed 11/08/2004 10:28:37
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
Title: Re: Character skips
Post by: Oz on Thu 12/08/2004 16:44:04
Any news on this?
Title: Re: Character skips
Post by: Pumaman on Mon 30/08/2004 21:24:43
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.
Title: Re: Character skips - SOLVED!
Post by: Oz on Sun 03/10/2004 02:36:44
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.
Title: Re: Character skips
Post by: Oz on Sun 03/10/2004 12:51:47
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.
Title: Re: Character skips
Post by: on Wed 06/10/2004 13:45:49
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.
Title: Re: Character skips
Post by: Scorpiorus on Tue 12/10/2004 15:04:01
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.
Title: Re: Character skips
Post by: Oz on Sun 21/11/2004 20:08:57
This was supposedly fixed in 2.62 beta, but I still get skipping (using 2.62 final). I've tried different speeds (although I really need the lowest speed possible for the game i'm working on) with no positive results. I've been testing this quite thoroughly and I think that it only happens when you move the character manually using the mouse. I have not yet seen it happen when using any of the MoveCharacter commands. Any news on this?
Title: Re: Character skips
Post by: Oz on Tue 30/11/2004 03:16:22
*BUMP*

Anything new on this?
Title: Re: Character skips
Post by: Pumaman on Tue 30/11/2004 20:04:07
Hmm, as far as I was aware this was fixed in 2.62.

If it's still a problem, any chance you could post a small game that demonstrates the problem?
Title: Re: Character skips
Post by: Oz on Wed 01/12/2004 14:03:34
Sure, here it is:

http://hem.bredband.net/jericho/Compiled.rar

You might have to move the char around a bit to actually catch the skipping, it seems to happen at random. Watch closely as the char approaches its destination.

All I did was load the default game and set the character speed to 1 and the animation speed to 1 (which are the settings I use for my own game). Note that skipping does NOT occur when using the default movement/animation speed settings, and as far as I can see it does not occur when using any of the MoveCharacter commands. I hope this helps!

Title: Re: Character skips
Post by: Oz on Wed 01/12/2004 14:16:52
I tried changing the movement speed to 3 and there seems to be no skipping. This would be a workaround, but I really need the lowest movement speed possible for my game because of the small scale. Otherwise the player will move around the screen too quickly, and it will look odd.
Title: Re: Character skips
Post by: Rui 'Trovatore' Pires on Wed 01/12/2004 14:24:01
Silly question, I suppose... but does it still skip when you use the "automatic speed change with scaling" thingy instead of setting the speed yourself?
Title: Re: Character skips
Post by: Oz on Wed 01/12/2004 14:39:23
Ah, no. I'm not using area scaling. I've drawn the graphics for the game at a small scale. The character is only 16x16 pixels (top-down game).
Title: Re: Character skips
Post by: Pumaman on Wed 01/12/2004 20:10:11
Well, I had a bit of a click around and didn't really notice anything. The closest I saw was a tiny (perhaps 2-3 pixel) skip if you do an almost-but-not-quite-vertical move; is this what you're referring to, or is there something more?
Title: Re: Character skips
Post by: Oz on Wed 01/12/2004 23:36:38
The length of the skip seems to vary. From barely noticeable to around 5 pixels or so. It looks really weird in my game at least, maybe because the character sprite is so small. But like I said, it doesn't happen when using a higher movement speed, unfortunately that is not an option for me...
Title: Re: Character skips
Post by: Scummbuddy on Thu 02/12/2004 02:39:20
could this be a good use of the Record Game ability? Since its not really documented, I can't exactly remember all about it.
Title: Re: Character skips
Post by: Oz on Thu 02/12/2004 14:16:09
Quote from: Scummbuddy on Thu 02/12/2004 02:39:20
could this be a good use of the Record Game ability? Since its not really documented, I can't exactly remember all about it.

Sounds interesting? Any further info on this? Might be useful to demonstrate the problem (if not yet obvious).
Title: Re: Character skips
Post by: strazer on Thu 02/12/2004 14:53:59
Try pressing [ALT]+[R].
Title: Re: Character skips
Post by: Oz on Fri 03/12/2004 03:47:29
Okay, here is a recording (i think!) of the skipping. The character skips a couple of times in a row when moved down across the screen in this replay. How do you play back an .agr-replay btw? ;)

http://hem.bredband.net/jericho/skip.agr

I hope this helps.
Title: Re: Character skips
Post by: strazer on Fri 03/12/2004 03:52:40
Afaik, with the setup program, under >> Advanced.
But of course, he needs your game, too. Recordings are no videos.
Title: Re: Character skips
Post by: Gilbert on Fri 03/12/2004 03:56:33
I don't know, but it looks quite minor to me, acceptable for me at least.
Title: Re: Character skips
Post by: Oz on Fri 03/12/2004 13:09:57
Quote from: strazer on Fri 03/12/2004 03:52:40
Afaik, with the setup program, under >> Advanced.
But of course, he needs your game, too. Recordings are no videos.

Yeah. I used the game that I uploaded earlier to record the replay (http://hem.bredband.net/jericho/Compiled.rar).

Gilbot,

I guess it's a matter of opinion, but my character is a lot smaller than Roger, so the skip gets bigger, sort of. It looks odd, and feels jerky.
Title: Re: Character skips
Post by: Pumaman on Fri 03/12/2004 23:22:22
Ok then -- this is sort of a known issue; v2.62 fixed a more serious skipping which happened in some situations.

I'll look into this to see if I can resolve it once and for all.
Title: Re: Character skips
Post by: Oz on Sat 04/12/2004 00:27:10
That sounds great! Thanks CJ, and good luck.
Title: Re: Character skips
Post by: Pumaman on Sun 12/12/2004 18:28:37
Ok, I've made some changes in 2.7 beta 6. Try it out on a backup copy of your game and see if it helps.
Title: Re: Character skips
Post by: Oz on Sun 12/12/2004 22:05:55
Quote from: Pumaman on Sun 12/12/2004 18:28:37
Ok, I've made some changes in 2.7 beta 6. Try it out on a backup copy of your game and see if it helps.

It's better now, but still some skipping occurs. Nothing I can't live with though. :)
Title: Re: Character skips
Post by: Sektor 13 on Tue 16/08/2005 22:28:41
Hey reviving old thread again . I have same problem in version 2.7, but not always, sometimes when character is resize in about 70% he is moving jerky, like game slowing down and than speeding up again. If the character is resized more than about 70% it moves normaly and smoothly or if it is bigger than 70% but this middle one looks strange.
Title: Re: Character skips
Post by: Pumaman on Tue 23/08/2005 18:46:11
It is possible that the movement could look a bit jerky when the speed-by-scaling option is in effect -- however this should only happen if the character has quite a large animation delay and a slow move speed. Is this the case?