Table of Contents
In my last devlog, I shared progress on initial driving mechanics, zombie crowds, and building atmospheric environments for my zombie action-driving game. After getting the core gameplay of plowing through zombie hordes, I focused on new systems to complement the experience.
For this update on my Zombie Apocalypse Action Driving Game, I’ll cover recent progress on the dynamic vehicle damage and repair systems, improving zombie behaviors to pose an intelligent threat, adding mounted weapons to mow down zombies from a distance, and upping the gore factor with splattered blood remains.
Task 1: Dynamic Vehicle Damage and Repair System
I have implemented a basic dynamic damage system that deforms the vehicle mesh at runtime whenever the car collides with a zombie or an item in the scene. Right now, the damage system is pretty basic, but I will be adjusting it so that depending on the location of the damage, items like headlights may not work, and the car might not steer as well or move slower.
I used the Mesh Deformation package from the Asset Store, which provides tools for deforming models at runtime. I plan to move to RayFire for mesh deformation, fracture the car into pieces, and apply realistic physics when the car explodes.
I also added a repair system where players can collect wrench pickups to fix damage over time. To keep things flexible for future pickups, I created an abstract PickUpEffect base class from which new types can inherit.
Task 2: Enhancing Zombie AI – Movement, Attacking, Light Avoidance
The zombies dislike light. So, the game will strategically place light sources for the player to use as safe zones. Each light source has a sphere collider defining its range. If zombies enter this radius, they immediately turn around and move out of the light. To balance this, lights slowly lose energy over time until they expire. I plan to build a replenishment system allowing players to recharge dimming lights.
I integrated Agents Navigation for pathfinding and movement, which leverages performant ECS principles. This will efficiently manage the navigation and behavior of zombies. I implemented walk-and-run animation states along with variable movement speeds for more diversity.
For attacking, each zombie randomly chooses from five animations before striking to add variety. Complex combat mechanics were unnecessary as this is a top-down driving-centric game.
Task 3 – Adding Weapons to the Vehicle
Although plowing through a horde of zombies is a lot of fun, it can damage your vehicle. So, I need to give the player a way to destroy zombies from a distance. So, I added weapons.
The first weapon I added is dual Gatling guns attached to the front right and left of the vehicle. These weapons have a high rate of fire and can thin the zombie horde from a distance. One of the issues I noticed is that because I have a gun on each side of the car, zombies could avoid the bullets directly in front of the vehicle. I added some variability to the bullet path, a spread angle, and staggard when bullets fire. This gives the visuals a better look and helps with the zombie’s ability to avoid the spread of bullets.
Task 4: Dynamic Blood Splatter Decals
Now, when zombies die from gunfire or vehicle impacts, blood spatters spawn beneath them using object pooling for efficiency. These random rotations and sizes provide nice atmospherics and reinforce the hits.
Overall, significant progress! For the next devlog, I plan to cover implementing the mission system, and I may attempt to migrate the existing zombie spawner to ECS. Let me know if you have any other suggested areas of focus. I would love to hear your feedback, so please feel free to leave a comment.