T
TheNozza
Guest
This is a specific question related to code I have created in my studio's game.
On the old forums I asked for assistance in solving a pathfinding problem I have for AI. http://gmc.yoyogames.com/index.php?showtopic=680691#entry4898982
I am using GameMaker's pathfinding system to calculate a path to the target point (as designated by current behaviour of the object), but then using my own code to control speed as required. The AI is designed to control top-down walker robots, which travel essentially in straight lines. When they need to turn a corner, they must decelerate, stop, rotate, then are able to accelerate again. When going around straight sides of a building, everything works absolutely fine, but currently when the robots have to travel in a diagonal, they fail to get up to speed.
My code currently calculates the next corner, ie next point on the path at which to stop, based upon a sudden change in the path direction. During a diagonal path, the path changes direction nearly every grid cell, as that is the way A* works.
What else can I try to calculate the next 'path corner?' Deceleration at the final target is easy since I already have its coordinates, and speed control works for this already.
On the old forums I asked for assistance in solving a pathfinding problem I have for AI. http://gmc.yoyogames.com/index.php?showtopic=680691#entry4898982
I am using GameMaker's pathfinding system to calculate a path to the target point (as designated by current behaviour of the object), but then using my own code to control speed as required. The AI is designed to control top-down walker robots, which travel essentially in straight lines. When they need to turn a corner, they must decelerate, stop, rotate, then are able to accelerate again. When going around straight sides of a building, everything works absolutely fine, but currently when the robots have to travel in a diagonal, they fail to get up to speed.
My code currently calculates the next corner, ie next point on the path at which to stop, based upon a sudden change in the path direction. During a diagonal path, the path changes direction nearly every grid cell, as that is the way A* works.
What else can I try to calculate the next 'path corner?' Deceleration at the final target is easy since I already have its coordinates, and speed control works for this already.