This is my final report for the Zombie Shooter Game. From the game mechanics point of view, the objective of the game is to kill as many zombies as possible without dying. There are two weapons with different damage and unlimited bullets.
For the creation of the level, I used the simple apocalypse asset pack that I have from the Humble Bundle, to create this beautiful city. The player mechanics is the Easy FPS pack from the asset store. I heavily modified it to suits my needs. I changed the weapons system, HUD and the bullet logic, so everything is working correctly for the purpose of this game. Both Zombie characters and animations are from Adobe Mixamo.
The basic Zombie has 5 states: Wandering, Chasing, Dead, Go to sound, go to shoot. All of them differs from the behavior of the Zombies and the speed they are moving. The Zombie can be a Leader and has a maximum of 5 helpers. The helpers Zombies are following their leader as long as they don’t see a player or they don’t get shoot. Then they are not looking for their leader, just chasing the player.
If their leader is dead, they are looking for the closest one to them, when they can’t find him they are becoming the Leaders for the nearest Zombies without the leader.
The default state of the Zombies is the wandering where they are going from one waypoint to another. When they are near the waypoint, the are looking (shooting ray) for the next waypoint. If they can’t find any they are just going to the random one from the list.
The other states have self-explanatory names. When the player shoots, the Zombies in the given distance are going to the sound source. The same when they are being shot, they go where there was shoot.
The Big Zombie does not have a leader. He is much more powerful than the normal zombie but he is deaf. He can’t hear when the player is shooting, but his vision is much better with the greater distance and wider angle. Also after their death, they are not becoming ragdoll, but they are playing the death animation.
The regular Zombie has better AI mechanics then the Big one. I wanted to create the scenario where there are tons of small enemies that are easy to kill, but they are working together and the Big hard to kill an enemy that is behaving not that smart. All the Zombies have the 3d sound effect that helps indicate if the enemy is close or far away from the player. For the animations of the attacking Zombies, I put the exit condition on them. Because without it, when the Zombies could attack they started, but as soon as the player moves they stopped. This created very weird looking characters.
As for the spawner. I put the limit on the number of allowed Zombies, 50 for the small ones and 5 for big ones. While testing I decided that this is more or less the optimal number of enemies on this map. The spawner favors the Big Zombies over the regular, I made it that way to always keep the hardest enemies on the map.
If I was about to start this project from the beginning I would make a couple of changes to the overall design of the AI system. As I started working on the horde mechanic around week 4, nearly all the AI logic was already in the game, so changing it would require starting from scratch. The 3d sound is also sometimes buggy, and paying too loud or too silent.
I would keep the logic for the Big Zombies, but the smaller Zombies would be controlled by one AI manager that will set the waypoints and state of each of the zombies. This would allow it to be the true horde with more natural movement. It would also have a big impact on the performance of the game, because now every AI character needs to calculate the staff for itself, in the AI manager scenario there would be only one calculation done by it.
My final implementation has its limitations that are visible during the gameplay. Sometimes you can see the lines of Zombies just going one after another until the player shoots to them. Also for the downsides of my game, the death animation of the Big Zombie is sometimes buggy and he floats in the air while playing it.
For the good aspects of my game, I really like the overall gameplay. Shooting to the Zombies is giving satisfaction, and the music from doom is making the game very enjoyable. The behavior of the zombies is good for the game. The player can feel when they are surrounding him and he needs to run and shoot to them. It reminds me of a little a Call of Duty Zombie modes, but much simpler. Overall I’m satisfied with the quality of my game.
References
https://assetstore.unity.com/packages/3d/characters/humanoids/easy-fps-73776
https://assetstore.unity.com/packages/3d/environments/simple-apocalypse-cartoon-assets-44678