• 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!

Pathfinding With Tiles?

N

Necromedes

Guest
I am using tiles for random map generation and the map sizes are quite large. We're talking 50,000 x 50,000. Hence why I am using tiles instead of instances for the map.

The generator works good enough at the moment but I intend on using motion planning for the path finding.
So now you surely see my issue. Is there a way to use motion planning for path finding and have it detect tile sets instead of instances?

I'm not a novice in GML but neither am I well versed in it, so bear with me and try to keep your explanations as simple as possible for me to fully grasp.

Thank you in advance.
 
You can use anything for an MP Grid using the functions "mp_grid_add_cell" and "mp_grid_clear_cell". There are also a few other functions available for manipulating mp grids. I would suggest giving the motion planning section of the manual a glance through.
 

NightFrost

Member
As said above, you can easily use motion planning by iterating through your map grid and recreating it as an mp grid. I tested this myself in a project, and the pathfinding worked as expected. (But I scrapped it because movement is not actually force-aligned to a grid, so mp grid planned movement was bit like drunkards walking around, and it obviously doesn't offer any solution to pathing enemies around each other.)
 
N

Necromedes

Guest
So what you're telling me is that I can use the tile extension in place of the instance extension and it will work the same way?

Edit: I just re-read the above posts and understand what you mean now. I guess I need to look into how cells work and go from there.

Any info on this would be appreciated.
 
Last edited by a moderator:
N

Necromedes

Guest
I should probably start a new thread for the new subject. With that being said, a mod can feel free to close this one.

Thanks for the help.
 
Top