Movement engine thingy bug?

Started by Chrille, Thu 17/04/2003 17:37:39

Previous topic - Next topic

Chrille

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 :/.
GASPOP software
http://www.gaspop.com

Pumaman

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
}

Chrille

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.
GASPOP software
http://www.gaspop.com

Pumaman

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?

Chrille

#4
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
GASPOP software
http://www.gaspop.com

Pumaman

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.

Chrille

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?
GASPOP software
http://www.gaspop.com

Pumaman

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?

Chrille

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.
GASPOP software
http://www.gaspop.com

Pumaman

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 ?

Chrille

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.
GASPOP software
http://www.gaspop.com

Pumaman

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.


Chrille

I'm not absolutley sure,  but I am quite sure :)
GASPOP software
http://www.gaspop.com

Pumaman

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.

SMF spam blocked by CleanTalk