Category : a-star

I’ve looked over several different implementations of A*. The current one I am using is based off of the pseudocode from the Wikipedia page. It finds the path but then the monster doesn’t move so I’m guessing it doesn’t work. It’s also incredibly slow. This is inside the update function which is called after the ..

Read more

I’m currently working on A* algorithm small project but I think there is a problem with manhattan distance. I mean, when the code equals to: inline int32 manhattanDistance(Node* startNode, Node* endNode) { int32 deltaX = std::abs(startNode->position.x – endNode->position.x); int32 deltaY = std::abs(startNode->position.y – endNode->position.y); return deltaX + deltaY; } It’s returning the path as: Valid ..

Read more

I just started to learn c++ at university, I have to create a pacman in c++. I wanted to integrate the algorithm of A. Star, I tried ^^, I think I have included it well however when the distance of the target is greater than 4, he sends me the list but not with the ..

Read more