Sign in to follow this  

Zombie AI

This topic is 786 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

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

This topic is 786 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