Jump to content
  • Advertisement
Sign in to follow this  
Speedy27

Zombie AI

This topic is 1094 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 need an AI script for my zombie survival game. I have absolutely no programming skills because I am an artist, not a programmer. Here is what I need the zombies to do:

 

1. Zombies scream and growl when chasing players and are nearly silent otherwise

2. Zombies need to be able to detect loud sounds such as gunshots and explosions. When they hear them, they should run toward the source,

3. Zombies should wander around the map when not chasing the player or running toward loud noises.

4. Zombies should have random amounts of health.

5. Zombies should spawn out of the players sight because that would just look bad.

6. There should be lots of zombies spawning.

 

I am using Unity 5 and the scripting language is unityScript. If you could give me an exact step-by-step guide as to how to implement the script you have come up with, I would really appreciate it.

Share this post


Link to post
Share on other sites
Advertisement

I did something similar a while back all built on the basic A* path finder. The basics where

 

- If the zombie can see the player that was the target destination for their A*

- If the zombie can see the player they make a noise.

- If the zombie can't see the player but they have heard a noise they use the sound location that is closest to the player for the target destination for their A*

- If the zombie has heard a noise they make a noise

- Zombies just do a random wander if none of the above was true

 

This gave a good cluster sort of effect as the zombies would gravitate towards the player or points of interest and you would get hoard type of mentality in them.

 

I ran this with 800+ zombies and all was good but I tended to disable A* for zombies away from the action areas to minimise CPU loading

 

The key is getting your A* fast and lean to keep the performance up and also making sure you only recalculate paths if you really need to

Share this post


Link to post
Share on other sites


I have absolutely no programming skills because I am an artist, not a programmer.

Here are a lot of programmers who can't do art and looking for someone to help out. Maybe you can exchange some custom models/pixel art whatever you do with some custom script/code smile.png

Share this post


Link to post
Share on other sites

Unity has a pathfinding ai system in the asset store. You will need some programming skills to get it working the way you want it, but the skill level needed to modify a complex system like that is much lower than the skill needed to make one from scratch.

Share this post


Link to post
Share on other sites

Unity has a pathfinding ai system in the asset store. You will need some programming skills to get it working the way you want it, but the skill level needed to modify a complex system like that is much lower than the skill needed to make one from scratch.

 

Unity's Navmesh stuff is available for free nowadays and is built in, and has some tutorials on how to use it.  (Though the nav systems on the store are still decent, I like Arogan's stuff)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!