Zombie AI

Started by
4 comments, last by ferrous 8 years, 6 months ago

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.

Advertisement

That's not something someone can write in an hour and give to you (unless it's just a poor clumsy one). That requires alot of work to implement.

There is no "exact step-by-step guide" for doing exactly what you want. That's not how programmers program. To learn to program, you learn the concepts and tools in a generic sense, and then create what you want, even if nobody else has ever done that exact specific thing before and no guides exist for it.

If you don't know programming, your best bet is probably to recruit a programmer for your project or to learn how to program. It'd be really hard to make a game without having someone who knows how to write the game's logic.

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


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

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 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)

This topic is closed to new replies.

Advertisement