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.

When trying to program hostile AI units for a war strategy game using pathfinder methods, do programmers ever have one algorithm for the unit to move and a separate algorithm for the unit to actively listen for nearby objectives (e.g. opposing warriors, power ups, opposing team's fortress, treasure, etc)?

Any insights as to how these methods function would make me happy.

share|improve this question
    
just search path-finding in this site! it gives you all the information you need about currently available algorithms. –  Ali.S Feb 18 '12 at 5:36
    
possible duplicate of Real Time Dynamic Pathfinding? –  Ali.S Feb 18 '12 at 5:38
1  
It's not clear what's being asked here. The title implies "pathfinding algorithms for higher dimensions" (3D? 4D?) whilst the question is asking about an AI will move and listen. Yes, they have separate algorithms, since an algorithm for movement just moves the enemy and has nothing to do with listening, and if it did also do listening, it would still just be a movement and listening algorithm running side by side. So what are you actually asking? How would you create an AI which keeps an eye out for objectives, and readjusts its path to incorporate them? Please clarify. –  doppelgreener Mar 19 '12 at 10:00
    
If it's about an AI which keeps an eye out for objectives and readjusts its path, this is definitely a duplicate of @Gajet's link. –  doppelgreener Mar 19 '12 at 10:02

1 Answer 1

up vote 1 down vote accepted

You can use the same algorithms as normal, for example this is my version of A* in 3D: http://roy-t.nl/index.php/2011/09/24/another-faster-version-of-a-2d3d-in-c/

All you have to do is to make the 'is adjacent' function fetch 3 dimensions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.