erratic walking (following up a thread from 2004) (SOLVED)

Started by EnterTheStory (aka tolworthy), Sun 27/04/2008 12:47:51

Previous topic - Next topic

EnterTheStory (aka tolworthy)

I have the same problem that is described in part 2 of this thread: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14325.0
Pumaman said he's add it to his list of things to fix. That was in 2004. Any update?

More details:
I have around forty characters on screen who walk randomly using "walkStraight" and they work perfectly. But the main character uses "walk" and jumps by around 70 pixels at a time. Antiglide is on, and all characters have solid turned off. Any idea what might be happening, or how to fix it?

Pumaman

I'm sure that particular issue was fixed. What movement and animation speeds are you using for the main character? When did this problem start happening?

EnterTheStory (aka tolworthy)

Quote from: Pumaman on Sun 27/04/2008 17:05:25
I'm sure that particular issue was fixed. What movement and animation speeds are you using for the main character? When did this problem start happening?
It's always been an issue, but I never paid attention to it because I was new and figured I was doing something stupid. (Probably I still am!) The character in question has his walkspeed set to 4. He walks from (140,100)->(390,150) and scales from 40 to 60%, ending up at 70 pixels high. His jumps are about the same as his height. He jumps maybe 3 or 4 times a second, and otherwise walks the right speed. I think I saw jumps when using a larger sprite, but the jump was a much smaller percentage of his height so thst's less of a problem.

Pumaman

Would you be able to upload a small 1-room game that demonstrates the problem?

EnterTheStory (aka tolworthy)

Quote from: Pumaman on Sun 27/04/2008 19:38:18
Would you be able to upload a small 1-room game that demonstrates the problem?
no, but I could upload a very large 1-room game that demonstrates the problem: http://enterthestory.com/dump/Enter%20The%20Story.zip :) The main character is the one who walks and jumps in a straight line, from the middle to the bottom right and back again a few times. (the file should be downloadable about 10 minutes after this message). Sorry the file is so large.

GarageGothic

Do the NPCs use scaling or are they drawn to actual on-screen size? If so (although not a fix to what seems like an engine bug) you could create a pre-scaled view for the player character too and switch to it in this kind of scenes.

(of course the walking speed of the character would need to be set manually for these screens and reset on exit)

EnterTheStory (aka tolworthy)

Quote from: GarageGothic on Mon 28/04/2008 03:29:43Do the NPCs use scaling or are they drawn to actual on-screen size?
Unfortunately everything is scaled. The NPCs are a general purpose "crowd" function that's designed to fit dozens of different scales and perspectives. I do have two different scales of main character, but I'm hesitant to create any more, since each size requires about 200 new sprites (12 frames per loop, 8 directions, plus speaking, etc.).

WalkStraight seems to work fine, so I'll probably just avoid using "Walk" altogether.

SSH

Its probably something to do with too many "holes" under the characters being cut out of the walkable areas, which is why WalkStraight works.
12

EnterTheStory (aka tolworthy)

Solved it! It turned out to be a combination of several things, in order of importance:

(1) a bonehead mistake: I have the same character with different names for "large" and "small" versions. At one point in testing I changed the walk speed for the wrong character.

(2) adjust speed with scaling. This made the biggest difference.

(3) tweaking other variables - e.g. animation speed, walk speed, etc.

My apologies for implying the AGS code was broken.

SSH

Quote from: tolworthy on Mon 28/04/2008 10:09:52
(2) adjust speed with scaling. This made the biggest difference.

Did having it turned on cause the problem, or did having it turned off cause the problem?
12

EnterTheStory (aka tolworthy)

Quote from: SSH on Mon 28/04/2008 10:35:03
Quote from: tolworthy on Mon 28/04/2008 10:09:52
(2) adjust speed with scaling. This made the biggest difference.

Did having it turned on cause the problem, or did having it turned off cause the problem?

Turned on. I think it was a combination of things (speed, and possibly animation speed since this would affect antiglide), but I saw the biggest difference when I disabled "adjust speed with scaling."

SMF spam blocked by CleanTalk