Methods in Game_Character Class

Does the findDirectionTo() method in RPG Maker MV contain the process from the A* algorithm ?
Also
Does the distance() method contain the manhattan distance / euclidean distance ?
Does the findDirectionTo() method in RPG Maker MV contain the process from the A* algorithm ?
Yes, it invokes A* from the starting point with a default range of up to 12 tiles.

Does the distance() method contain the manhattan distance / euclidean distance ?
$gameMap.distance uses a Manhattan/rectilinear metric: dx + dy.
Oh okey, I got it. Thank You
Yes, it invokes A* from the starting point with a default range of up to 12 tiles.


$gameMap.distance uses a Manhattan/rectilinear metric: dx + dy.

Capturzxae.PNG


So, I'm currently testing the a star algorithm to see how it works. Here I am trying to create a map that has the same size in the example size 15 x 15. The result is when I run the script call

this. moveStraight(findDirectionTo($gamePlayer. x, $gamePlayer. y));

The enemy prefers to chase through the bottom and then up instead of going up first and then going right even though the distance between the two is the same (28 tiles). Do you know why it could be like that ?
The enemy prefers to chase through the bottom and then up instead of going up first and then going right even though the distance between the two is the same (28 tiles). Do you know why it could be like that ?
Because...that's the direction the programmers chose to be the default? Why wouldn't it be like that?

You know you can just look at the code for anything you want in the files in the js directory of your project, right?
Because...that's the direction the programmers chose to be the default? Why wouldn't it be like that?

You know you can just look at the code for anything you want in the files in the js directory of your project, right?

Yes of course I can see it but I don't really understand it very well because my programming skills are still standard. But thanks for the answer
It's because it checks directions (j loop) in ascending order: 2 (down), 4 (left), 6 (right), 8 (up).

The pathfinding explanations on these pages are nice:
RMMV's A* implementation is quite standard, so it should be fairly straightforward if you understand the underlying logic.
It's because it checks directions (j loop) in ascending order: 2 (down), 4 (left), 6 (right), 8 (up).

The pathfinding explanations on these pages are nice:
RMMV's A* implementation is quite standard, so it should be fairly straightforward if you understand the underlying logic.

Oh, Okey. I got it. Thanks for the answer ....

During my college days I didn't really get an easy explanation from my lecturer

Original thread: https://forums.rpgmakerweb.com/threads/methods-in-game_character-class.153747/