Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have implemented some A* code in C# using this JavaScript code.

My C# implementation is the same as the above javascript code. But I'm unable to get it to work properly, e.g pathfinder blocks itself when the same number of walls are placed in front of it and some other scenarios as well like blocking it one way completely, I am assuming that code is standalone (not having other functionality included in other scripts).

Can anyone tell me if the above code is missing any A star functionality?

share|improve this question

closed as off-topic by Anko, 21st Century Moose, Philipp, Seth Battin, Sean Middleditch Dec 16 '13 at 7:52

  • This question does not appear to be about game development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Can you please clarify, "blocking it one way completely" and "blocks itself when the same number of walls are placed in front of it". Screenshots are always useful. This is the only way anyone is going to be able to help you. – Arcane Engineer Nov 17 '11 at 14:09
It would be best if you showed your C# translation just in case you missed something. You can use – John McDonald Nov 17 '11 at 16:36
You may also want to use a C++ version of A* instead of javascript, that being a much closer to C# language and full of OOP and stuff. – Patrick Hughes Nov 18 '11 at 2:49
A* is a very well established algorithm. Instead of looking though your code trying to fix anything messed up; how about looking at someone elses working code. – ClassicThunder Nov 18 '11 at 4:46
This question appears to be off-topic because it is about debugging your code for you. – Anko Dec 12 '13 at 12:26