Pathfinding: point between two boxes

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
saucjedi
Posts: 3
Joined: Tue Jun 23, 2015 8:28 am

Pathfinding: point between two boxes

Post by saucjedi »

I have understood more or less how SCUMM uses boxes and the box matrix in order to do pathfinding, but there is one thing I hace not deciphered yet...

When you are in a box and going to the next, how does SCUMM chose which point to go? I mean, I know it chooses a point that is along the line that is the edge of both boxes... but I don't know how it choses it.
digitall
ScummVM Developer
Posts: 1185
Joined: Thu Aug 02, 2012 1:40 pm

Post by digitall »

Use The Source, Luke! :)

I'm not intimately familar with SCUMM engine internals or the codebase, but I think the function that deals with this is here:
https://github.com/scummvm/scummvm/blob ... r.cpp#L681

specifically, I think it is this call here:
https://github.com/scummvm/scummvm/blob ... r.cpp#L751
saucjedi
Posts: 3
Joined: Tue Jun 23, 2015 8:28 am

Post by saucjedi »

digitall wrote:Use The Source, Luke! :)

I'm not intimately familar with SCUMM engine internals or the codebase, but I think the function that deals with this is here:
https://github.com/scummvm/scummvm/blob ... r.cpp#L681

specifically, I think it is this call here:
https://github.com/scummvm/scummvm/blob ... r.cpp#L751
I did use the source, but this particular thing eluded me... and I am sure it was right before my face... I'm going to check the source you point me out to.

Source is with me, but I am not a SCUMMer yet...
Post Reply