Skip to main content
replaced http://gamedev.stackexchange.com/ with https://gamedev.stackexchange.com/
Source Link

without any clues of what your game looks like, what platform it is aimed for and what are you willing to do I'm going to try to give some hints (since I myself have been in your place):

Research:

  • Research games that look alike the one you're making;
  • Contact the devs of such games, converse with they implementations and strategies;
  • Do some reverse engineering.

Try:

  • You asked: "my code was working perfect when there were no obstacles but my game has obstacles [...] should I implement A* or any other algorithm?" Yes, yes you should. That's just the next step to know if the algorithm will be suitable for your game;
  • Experiment with navigational meshes, waypoints, different heuristics and note down the results to compare and evaluate;
  • Also http://gamedev.stackexchange.com/a/73740/30632https://gamedev.stackexchange.com/a/73740/30632

And lastly, when I was first learning path-finding algorithms, I used to make tons of little test cases to see how would the agent behave in certain situations and how could I make it do better by tweaking the heuristics and etc.

without any clues of what your game looks like, what platform it is aimed for and what are you willing to do I'm going to try to give some hints (since I myself have been in your place):

Research:

  • Research games that look alike the one you're making;
  • Contact the devs of such games, converse with they implementations and strategies;
  • Do some reverse engineering.

Try:

  • You asked: "my code was working perfect when there were no obstacles but my game has obstacles [...] should I implement A* or any other algorithm?" Yes, yes you should. That's just the next step to know if the algorithm will be suitable for your game;
  • Experiment with navigational meshes, waypoints, different heuristics and note down the results to compare and evaluate;
  • Also http://gamedev.stackexchange.com/a/73740/30632

And lastly, when I was first learning path-finding algorithms, I used to make tons of little test cases to see how would the agent behave in certain situations and how could I make it do better by tweaking the heuristics and etc.

without any clues of what your game looks like, what platform it is aimed for and what are you willing to do I'm going to try to give some hints (since I myself have been in your place):

Research:

  • Research games that look alike the one you're making;
  • Contact the devs of such games, converse with they implementations and strategies;
  • Do some reverse engineering.

Try:

  • You asked: "my code was working perfect when there were no obstacles but my game has obstacles [...] should I implement A* or any other algorithm?" Yes, yes you should. That's just the next step to know if the algorithm will be suitable for your game;
  • Experiment with navigational meshes, waypoints, different heuristics and note down the results to compare and evaluate;
  • Also https://gamedev.stackexchange.com/a/73740/30632

And lastly, when I was first learning path-finding algorithms, I used to make tons of little test cases to see how would the agent behave in certain situations and how could I make it do better by tweaking the heuristics and etc.

Source Link

without any clues of what your game looks like, what platform it is aimed for and what are you willing to do I'm going to try to give some hints (since I myself have been in your place):

Research:

  • Research games that look alike the one you're making;
  • Contact the devs of such games, converse with they implementations and strategies;
  • Do some reverse engineering.

Try:

  • You asked: "my code was working perfect when there were no obstacles but my game has obstacles [...] should I implement A* or any other algorithm?" Yes, yes you should. That's just the next step to know if the algorithm will be suitable for your game;
  • Experiment with navigational meshes, waypoints, different heuristics and note down the results to compare and evaluate;
  • Also http://gamedev.stackexchange.com/a/73740/30632

And lastly, when I was first learning path-finding algorithms, I used to make tons of little test cases to see how would the agent behave in certain situations and how could I make it do better by tweaking the heuristics and etc.