S
squirrelah
Guest
Hello, im trying to make some pathing for an RTS and from what ive gathered if i want to use what gamemaker already has, and not make my own algorithm which seems like it would take forever, i have more or less two options. I've never used either of these before, and i was just wondering what the pros and cons are of using one versus the other.
for those who aren't familiar RTS's typically have the following features in regards to pathing.
1. A unit will move in as straight a line as possible.
2. You can que movement(and other commands in conjunction with movement), which means you can tell it to move to position x1, y1 and then after it does this action to the best of its ability move to x2,y2.
3. There are multiple units doing all of the above simultaneously.
4. There are buildings that can be added to the map that these units cannot move through.
option 1:
mp_potential_path seems like the more basic of the two as all i have to do is set up the pathing correctly, and then mark everything that i want the pathing to try and move around as solid. I
1. Seems like it will be easily achievable with this
2. Not really sure where to even start with this
3. Supposedly this takes up less computing power, but im worried about the movement being extremely clunky because of units bumping into each other.
4. Also doesn't seem to particularly be an issue.
mp_grid_path. This seems like what i should be using,
1. I've had some issues in testing where pathing doesn't move in as straight of a line, as possible but it moves diagonally at a 1 to 1 ratio and then moves in a straight line once its at the same x or y coordinate.
2. Also not sure how to do this
3. I dont think theres really going to be an issue here either unless i mess something up.
4. I think the mp_add_rectangle where a building is created and then mp_clear_rectangle when it gets destroyed would cover this but im worried that movement that started before a building was created/destroyed wouldn't register as the path was made before this happened.
TLDR; I have never used paths before, if someone who has used them can share some insight i'd be very appreciative. Also, how could you que movements?
for those who aren't familiar RTS's typically have the following features in regards to pathing.
1. A unit will move in as straight a line as possible.
2. You can que movement(and other commands in conjunction with movement), which means you can tell it to move to position x1, y1 and then after it does this action to the best of its ability move to x2,y2.
3. There are multiple units doing all of the above simultaneously.
4. There are buildings that can be added to the map that these units cannot move through.
option 1:
mp_potential_path seems like the more basic of the two as all i have to do is set up the pathing correctly, and then mark everything that i want the pathing to try and move around as solid. I
1. Seems like it will be easily achievable with this
2. Not really sure where to even start with this
3. Supposedly this takes up less computing power, but im worried about the movement being extremely clunky because of units bumping into each other.
4. Also doesn't seem to particularly be an issue.
mp_grid_path. This seems like what i should be using,
1. I've had some issues in testing where pathing doesn't move in as straight of a line, as possible but it moves diagonally at a 1 to 1 ratio and then moves in a straight line once its at the same x or y coordinate.
2. Also not sure how to do this
3. I dont think theres really going to be an issue here either unless i mess something up.
4. I think the mp_add_rectangle where a building is created and then mp_clear_rectangle when it gets destroyed would cover this but im worried that movement that started before a building was created/destroyed wouldn't register as the path was made before this happened.
TLDR; I have never used paths before, if someone who has used them can share some insight i'd be very appreciative. Also, how could you que movements?