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.

I am working on a shoot-up-game in XNA, it is going to be my final project in school. I was thinking of utilizing the minimax algorithm for AI agents for making tactics. However, I ralized that the most important issue in such a game is to avoid bullets(fired by the player). An AI agent making tactics but no good at avoiding bullets would be useless in a shoot-em-up game I guess.

So, I need your help about what algorithm to utilize. It's not going to be a bullet storm like game, but it's fast(thanks to XNA). I have read about using threat maps and also pathfinding algorithms but couldn't figure out which one is ideal in such a game. I mean it needs to be simple enough for a fast paced gameplay, but it should also help AI agents act intelligently.

Thank you..

share|improve this question
1  
This question might be of interest for you. Maybe it's even a duplicate of yours. –  bummzack Apr 28 '12 at 13:04
add comment

2 Answers

You could just keep it simple. Create a frustum (smaller than view frustum) to calculate a sort of target area for the player. If the enemy is in that frustum, they should stay in cover (for a period of time, not forever). Then make sure you're A.I. always try to spread out.

If they are always trying to use some tactics then you should be able to find out where you want them to be and create a path for them to that point. So they will always be trying to follow their path to that point. If you use the frustum to tell them to take cover then it could look effective. They move a bit along the path, then their in sight so they instantly take cover.

It should be smart enough to look compelling, but dump enough to give the player plenty of time to shoot them. Also, if their popping up when your not looking, it means it will drive the player to look around a lot, which will add to the sense of vertigo in your fast paced shooter.

The main problem, I think, will be keeping a track of the nearest bit of effective cover to get them to run to when their being aimed at.

share|improve this answer
add comment

You should use a combination of Steering Behaviours and speed fluctuation if you want your AI to be able to dodge bullets. It will not be perfect so maybet it will be the right tool.

share|improve this answer
add comment

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.