Best Way of Developing Pathfinding AI
I was recently working on a 3D game where a sniper attempt to shoot another sniper in a small town. Since this is in 3D then what is the best way that I should tackle this problem? Do you have any suggestions to what AI libraries I should use and what functions I should use?
"I have an $86000 company! What do you have, moron?"- FrancoisSoft:) FrancoisSoft :)My Research
Whoooo.... that''s a whopper.
When you say that "this is in 3D", do you mean that the agents can go up and down to different levels of buildings, etc. i.e. the map is multi-tiered?
If so, that is a big part of your problem. In a way, if you have a sniper situation, he is more concerned with choosing a correct location for sniping and just moving to that. In that case, the pathfinding is just a matter of moving to the points that allow you go to go up/down to the different levels until you are on the level you have selected... then going to the location.
As far as functions and libraries, A* will do the trick with a little modification for the levels. Analyzing the map to determine where he should go to is a different issue entirely - but that''s not what you were asking for.
Unrelated question... do you really mean 2 classic snipers? That game will come to a stalemate really quick as they both find camping places that can''t see each other... and each waits for the other.
Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
When you say that "this is in 3D", do you mean that the agents can go up and down to different levels of buildings, etc. i.e. the map is multi-tiered?
If so, that is a big part of your problem. In a way, if you have a sniper situation, he is more concerned with choosing a correct location for sniping and just moving to that. In that case, the pathfinding is just a matter of moving to the points that allow you go to go up/down to the different levels until you are on the level you have selected... then going to the location.
As far as functions and libraries, A* will do the trick with a little modification for the levels. Analyzing the map to determine where he should go to is a different issue entirely - but that''s not what you were asking for.
Unrelated question... do you really mean 2 classic snipers? That game will come to a stalemate really quick as they both find camping places that can''t see each other... and each waits for the other.
Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
quote:
Original post by InnocuousFox
Unrelated question... do you really mean 2 classic snipers? That game will come to a stalemate really quick as they both find camping places that can''t see each other... and each waits for the other
Wouldn''t giving them a certain time-out value where they''d decide to just get up after a while and try to find an other location solve the problem?
Well, that would be a bit stupid in an IRL situation because a sniper that runs around just... y''know... isn''t a sniper

...or infinite food and water either.
Anyway, a node map with an adjacency matrix (and maybe direction matrix) for the pathfinding, and use a series of weighted nodes to choose the destination?
ToohrVyk
Anyway, a node map with an adjacency matrix (and maybe direction matrix) for the pathfinding, and use a series of weighted nodes to choose the destination?
ToohrVyk

Watched ''Enemy at the Gates'' recently? Anyhow, I''d have pre-defined locations that the AI sniper can chose from (such as spots on roof-tops etc), which would be planted using a map-editor. Then the AI uses A* to navigate to it''s chosen position. Or, you could simply develop a waypoint system that leads between sniper positions like a net. You''d probably still need A* to navigate the net, but it would be faster. Of coure, there is the problem that the player, after playing on the same level several times, will begin to learn the sniper locations. But this can be solved simply by laying tons of these sniper-points down.
As for the stalemate - yeah, massive problem wich equals bordem. There has to be something to draw the snipers out and get them moving. Else the player will sit in the one spot for ages, bored, and thinking negatively about your game. I suggest using scenarios like this:
1 sniper defends a flag, while the other one attepts to sneak in and grab the flag. This makes for some interesting gameplay. More so if you have, say, 2v2 snipers. For each team, 1 could find a position near their flag while the otherone goes after the enemy flag.
As for the stalemate - yeah, massive problem wich equals bordem. There has to be something to draw the snipers out and get them moving. Else the player will sit in the one spot for ages, bored, and thinking negatively about your game. I suggest using scenarios like this:
1 sniper defends a flag, while the other one attepts to sneak in and grab the flag. This makes for some interesting gameplay. More so if you have, say, 2v2 snipers. For each team, 1 could find a position near their flag while the otherone goes after the enemy flag.
-----------Autumn Fog - A 2D Action Wargame
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement