I am new to game programming I currently am using unity's 2D power to remake an 2D game for sake of practice. So I am just little confuse about one thing, so far every enemy in my game was dumb(they move on predefined paths) but this enemy, alien-copter, flies and follow the player wherever the player goes. My question is should I implement any pathfinding algorithm? I had studied A* but I trying to figure out if A* is gonna be helpful in my envoirnment because player will be moving and the enemy have to keep on looking for shortest path. I tried to write code for this AI my code was working perfect when there were no obstacles but my game has obstacles so I want something efficient so what do you people think should I implement A* or any other algorithm or not?
Take the 2-minute tour
×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.
closed as primarily opinion-based by Seth Battin, congusbongus, Anko, Byte56♦ Jun 9 at 22:25Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question. |
|||||||||||||||||||||
|
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:
Try:
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. |
|||||
|