Few newbie problems on AI??

Started by
0 comments, last by Nice Coder 19 years, 3 months ago
Hy guys! I've got some problems om game AI 1] In games like Delta Force, which player and enemies are moving mostly on the terrain how to do enemy AI. Are they moving on a fixed path? If not how to code AI to move avoiding obsticals. I guess path finding is not good here , cuz the the number of Nodes in a terrain will be huge? so to find shortest path between two given Nodes, will eat our fps! 2] In indoor games like quake, I guess the method is shortest path? Like in Pacman, there is only nodes in the path.Am I correct? Or is it ok to use fixed path? 3] I got no idea of AI of fighting games like Mortal Kombat.Where can I found tutorial about this? thanks guys.
Never underestimate radical vision
Advertisement
ok, this is going to be a biggish post.

First, A* is very fast. Especially with a good heuristic. With Heirachial A*, you can basically get a path from one end of the map, to the other. As long as the path exists, it will be fine. If it doesn't, then it will take some time.

There is a way around that: Get a path manager. It basically gets all the paths, orders them, and computes them, so that per frame its not using that much time, yet it computes all the paths when needed.

With delta force, i would say (i haven't played the game), that there using A*, but with terrain cost as a heuristic. For eg. Moving up a hill increases the path cost much more then moving on a flat level road. So, your pathing algo will find the path on the road system, until it has to move off. (which is rather nice, once you get it to work).

There are always nodes in the path, there are a few (very complex) algorithms which will turn a mesh, into a nav mesh (which you then use for pathfinding).

For info on pathing, look at This tutorial/

For the fighting games, i'm not sure what they use. Thry probably have some sort of fsm. (finite state machine... Tutorial)

Hmmm. I'll have to get back to you on that.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.

This topic is closed to new replies.

Advertisement