Sign in to follow this  

Zombie AI

This topic is 2852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a zombie game. The zombies all chase after the player but he can easily avoid them by running around because the zombies are always chasing after the players current position. There is another problem that all the zombies essentially get clumped together (if there is no collision between them) they will actually move to the same position. Which can be solved somewhat by flocking code, giving you some separation but you still have the never reach scenario. Do you think if I employed some sort of pacman AI it would be better. So some zombies would chase after him (the red guy), some zombies would predict the position where he is heading and cut him off. [Edited by - Aiursrage on February 23, 2010 8:40:52 PM]

Share this post


Link to post
Share on other sites
There are various that this problem is commonly solved. None of them involve movement prediction:

1) make the zombies fast enough that they can always catch the player
2) design your maps so that the player can't kite the zombies
3) design your game so that kiting is actually a fun game mechanic and ignore the problem

Using flocking code is a good approach to solving the all zombies in the same place problem.

Destination prediction is a "very hard" problem. You can just do some simple dead reckoning given the current movement vector and see if that works. Anything you try is going to have failure cases that players will figure out; they will almost always be able to figure out a way to kite your zombies if you don't do one of the above 3 design fixes or some other design solution.

-me

Share this post


Link to post
Share on other sites
You might want to check these references on multiplayer pursuit-evasion games.

Basically, in this approach you're looking to have some centralized "higher intelligence" direct the zombies to encircle the player in such a way that no matter what he does, he cannot escape.

A while back there was another conversation on these boards abut finding optimal strategies to avoid zombies (who can read your mind!); that thread, if you can find it, may help to give you some ideas. [EDIT: It was this thread]

[Edited by - Emergent on February 24, 2010 2:13:21 PM]

Share this post


Link to post
Share on other sites
If the zombies move at least at a near constant speed, then space them out. So they won't clump together as easy, or be as easily avoided. Remember, you need lots of zombies. They are only a threat when they have overwhelming numbers on their side.

When zombies get close enough, they are supposed to grapple onto their victim, and a struggle starts. The victim will be slowed down, or immobile while he wrestles off the zombie(s), and this gives the others time to catch up.

The player should feel boxed in. Running from the zombies should only lead to more zombies in the other direction! They are meant to be an overwhelming force.

There is usually a build up to the hero being stuck in a section where he has to overcome some obstacle in a confined space while a horde of zombies is coming from every direction.

Also, in any real zombie story, there is usually a much worse villain then the zombies, like the military, or terrorists.

Night Of The Living Dead( http://www.youtube.com/watch?v=BBc18J5cUcs ) is in the public domain. You can watch it freely on youtube and use it to inspire some scenarios that are better suited to zombies.

Share this post


Link to post
Share on other sites

This topic is 2852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this