Advertisement

Problems implementing A* - Need a knowledgeable eye to look at my code

Started by February 20, 2015 04:48 PM
10 comments, last by Pether 9 years, 11 months ago
Did you manage to fix your code? If you can post a complete program that I can compile and run myself, I'll give you a hand. But you should learn how to debug your programs.

Heya,

no, I haven't got it to work. But I haven't had any time to look at it since last time as I've had three assignments due today and another one this weekend. In a world with unlimited time I would have created a better environment to test the pathfinding, showing all the values and behind able to create obstacles and new paths while it's running, but haven't had time to do that. But I have thought of doing a desk test since the fault most likely lies somewhere in the code that calculates the costs of moving, so I should be able to see where if I just write it down.

I cut the code down to the bare minimum to run and show the pathfinding.

https://www.dropbox.com/s/to7ljzjiuzlxlbd/Gamestuff.rar?dl=0

*edit*

I actually got it to work correctly, turns out the sortfunction for the vector didn't work as planned so I replaced it.

This topic is closed to new replies.

Advertisement