Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Chrille on Thu 17/04/2003 17:37:39

Title: Movement engine thingy bug?
Post by: Chrille on Thu 17/04/2003 17:37:39
I'm not sure when this bug popped up, but I do know it wasn't in v2.53. When I upgraded to 2.54, there was the jump-bug in the movement engine, it was fixed in that patched version, but the movement is still somewhat weird.

Revenants checks for exact coordinates all the time. Instead of running a blocking function, I use the MoveCharacter and set an integer when the player interacts with something. When the player is on those coordinates and the integer is set to that certain value, the interaction thingy runs. But in the latest version, the player doesn't always seem to want to move all the way to specified coordinates if he stands on certain parts of the walkable area. This screws up the game quite a bit :/.
Title: Re:Movement engine thingy bug?
Post by: Pumaman on Thu 17/04/2003 19:19:37
Strange, I'll look into it.

However, an easier approach might perhaps be to do something like:

if ((character[EGO].walking == 0) && (integer == 1)) {
 // do the interaction
}
Title: Re:Movement engine thingy bug?
Post by: Chrille on Thu 17/04/2003 21:53:44
True, but that might screw things up, since you can click somewhere else and "cancel" the interaction if the player is still walking towards it :)

Plus I'd have to change heaps of code.
Title: Re:Movement engine thingy bug?
Post by: Pumaman on Sat 19/04/2003 18:08:16
I made a quick test game, which displays the mouse co-ordinates passed to ProcessClick, and then the player co-ordinates at the end of the move, and they always matched for me.

How often does the problem crop up for you?
Title: Re:Movement engine thingy bug?
Post by: Chrille on Sat 19/04/2003 19:41:47
Pretty much all the time :-/


Maybe it could be MoveCharacter related? But then again maybe the Walk mode processclick runs MoveCharacter (EGO,mouse.x,mouse.y) or something, I dunno :P
Title: Re:Movement engine thingy bug?
Post by: Pumaman on Sat 19/04/2003 22:16:50
Yep, it does.

Well, how about you Display the co-ordinates that you pass to MoveCharacter, and then Display the character's co-ordinates when he finishes moving, and see if there is a difference - to make sure we know whether this is the problem or not.
Title: Re:Movement engine thingy bug?
Post by: Chrille on Sat 19/04/2003 22:57:16
I added this stuff for the first two rooms and the character often stops just before he reached the final coordinates. When you click on the ground to walk the directly he seems to walk exactly where you want him to though.

Would you like a copy of the game to investigate further?
Title: Re:Movement engine thingy bug?
Post by: Pumaman on Sat 19/04/2003 23:03:36
So are you saying that if you click on the ground to walk it works, but using your MoveCharacter command it doesn't? Are you sure that MoveCharacter is specifying destination co-ordinates that are on a walkable area?
Title: Re:Movement engine thingy bug?
Post by: Chrille on Sat 19/04/2003 23:39:14
Gaah! This is not making any sense. I made it so that it showed which coordinates the player moved to when you clicked on a walkable area. When I tried the game, the movement worked fine all of a sudden. So I went in and out of the rooms a few times and eventually things got messed up AGAIN.

But yes, moving by clicking on a walkable area spot works without any problems. And I am sure that the MoveCharacter destinations are on a walkable area. If you click on an object once and the player tries to reach it, he usually stops only a few pixels away. If you click on it again, he manages to move up to it.  It's strange because it worked just fine in v 2.53.
Title: Re:Movement engine thingy bug?
Post by: Pumaman on Sun 20/04/2003 00:04:09
is it possible that this is related to characters blocking now, and that there is another character in the way which is impeding his movement?

The other thing is, are you using MoveCharacterToObject, or a manual MoveCharacter with GetObjectX ?
Title: Re:Movement engine thingy bug?
Post by: Chrille on Sun 20/04/2003 00:44:19
The characters blocking thingamabob might be it. Does it only block if the character is in the same room as the player?

Regarding the other thing, I'm using neither. Just a regular MoveCharacter with "regular" coordinates.
Title: Re:Movement engine thingy bug?
Post by: Pumaman on Sun 20/04/2003 01:09:35
Yep it only blocks if both characters are in the same room and neither of them has the "Allow walk through" thingy set.

Are you absolutely sure this didn't happen in 2.53? Because the only thing that's changed in the pathfinder was horizontal and vertical movement in 2.54.

Title: Re:Movement engine thingy bug?
Post by: Chrille on Sun 20/04/2003 16:52:08
I'm not absolutley sure,  but I am quite sure :)
Title: Re:Movement engine thingy bug?
Post by: Pumaman on Sun 20/04/2003 21:48:56
Hmm... well, if you like, upload the game files for me somewhere - it looks like that's going to be the only way to track this down.