• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows Does mp_grid_path use Dijkstra's algorithm?

Coded Games

Member
Title says it all. Working on an assignment for my Data Structures class and was wondering if I could use it as an easy way to visualize paths.
 

Nux

GameMaker Staff
GameMaker Dev.
"mp_grid functions
The final type of function use a much more complex mechanism based on a grid-based approach (sometimes called an A* algorithm)."
source

Edit: even though A* is a modification of Dijkstra's Algorithm, I assume you want pure Dijkstra's, for Graph-based traversal, and not grid-based traversal?
 

NightFrost

Member
Yeah, mp_grid in GM always uses a grid-shaped graph for A star (as you can see in the create command). If you need something else, you'll have to write the algo yourself.
 

Coded Games

Member
Thanks guys. I was looking through the manual but didn't see that. I assumed that it didn't since Dijkstra's algorithm seems like it would be rather slow.
 
Top