Zombie AI…

So, over the last two weeks I’ve been updating the zombie AI.

The old AI system had many problems, was hard to update, and lacked many important features. So I started from scratch and implemented a behavior hierarchy, similar to the one described in this book.

Here are some key features of the new system:

  • zombie AI is now sight/sound based. Zombies will tend to wander around aimlessly, until they see/hear something that catches their attention. Things like the sound of the player hitting an object with a blunt weapon, or firing a gun will attract zombies, but they won’t automatically know what caused the sound. This means that zombies can be distracted with sounds while the player heads in the opposite direction. It also means that it’s now possible to sneak up on zombies from behind.
  • zombies now flock more realistically. No longer will they randomly intersect walls, or the player, or each other. When attacking, they’ll also try to surround their target.
  • zombies will try to break down the doors of buildings, if they see a human/hear a noise inside.

I’ve also improved several other aspects of gameplay. Items that require ammo now display their ammo counter inside their icon, when assigned to any of the active item slots. Also, zombies and props can no longer be hit through walls or other solid surfaces.

Here are some screens showing the debug info I use to help me visualize the new AI system. White lines show new A* paths that are calculated. Green lines point to the next node on a zombie’s path when the zombies is following a sound. Magenta/Cyan lines point to a zombie’s active target (cyan = close, magenta = far). Red lines show the next node on a zombie’s path when the zombie is chasing a target (although zombies are allowed to veer off their path when the target is directly in range). Yellow lines point to a new sound that a zombie has heard.

Screenshot1, Screenshot2, Screenshot3, Screenshot4, Screenshot5

Here are some .gif animations showing various new features listed above.

This animated .gif shows some zombies chasing a player into a building, and trying to break the door down:

This is another animated .gif showing zombies breaking a door down to get to the player:

This is an animated .gif showing some of the new swarming behaviour (sped up 200%):

This is an animated .gif showing how the active item ammo counters look:



12 Responses to “Zombie AI…”

  1. Frankie Stellato says:

    Wow man this are some seriously great improvements! The AI does seem like it’d be harder to just hide in a room and wait for things to pass. Love the idea of not making any sound to try and sneak around. Have you given the Zombie survival guide a read? If not check it out it talks all about sneaking around, weapons and all kinds of stuff that I think could help ya 🙂

  2. John Zilka says:

    Hey Tyson, this looks amazing!!
    Is the book you posted the link to the only resource you used for AI? Also what language are you scripting in?

  3. Tyson Ibele says:

    @ Frankie Stellato:

    Haven’t read that one yet, but it’s definitely on my to-read list 🙂

    @ John Zilka:

    Mainly that one, yes. I also own “Artifical Intelligence for Games”, which helped as well.

    Also, I’ve done everything in Javascript.

  4. Battler773 says:

    You could add beta testing so that you can get comments and help from the community! Also, I (and everybody else would love it. Aswell as that. Could you make a login system to get custom skins and access the world from any computer. You would also make money! (please make me an account free

  5. Kyle King says:

    I am not sure if you have answered this question before, but what are the chances it will be on Android? I have a Xoom Tablet instead of an iPad, and would love to be able to play it on there.

  6. Tyson Ibele says:

    @ Kyle King:

    I’ll put it on Android if the iOS release does well 🙂

  7. WowAwesome says:

    Wow this game is so big, I think after you sell it on mobile you need to port it on pc or console. It’s gonna be a hit.

  8. bigbadwofl says:

    The swarming looks and works really well. Like a good old fashioned moshpit.

    bigbawofl dev blog: http://bigbadwofl.blogspot.com/

  9. Kyle King says:

    @ Tyson Ibele:
    I commented on your latest post as well, and would love to see an android port. I am sure you are aware, but as soon as you get some advertising for this game… your going to have a huge hit. Congrats! As always you’ve been an inspiration, and continue to be one!

    I am pretty sure your doing just fine, but if your interested in investors let me know!

    email –

  10. Tyson Ibele says:

    @ Kyle King:

    Thanks Kyle! Best thing you can do is spread the word 🙂

  11. Ryan McMann says:

    Please make it so that you die easily, on the video I think you might of given yourself ifinite health, but if that is normal health make it much more easier to die. Also really looking forward to this game

  12. Philipp says:

    Thank you for the effort, keep up the good work Great work.

Log in or Register

Leave a Reply

Your email address will not be published. Required fields are marked *