Mike DeVine's profile

DEVELOPMENT: Humans vs. Zombies: The Video Game

Humans vs. Zombies Training Simulator
This project started out as just an assignment in my Programming class, but as we went through more and more assignments in class I decided it would be fun to adapt what we were learning to a project I had already put some time into. So at the end of the quarter, instead of several half-assed projects I ended up with one big, fully-assed project for my troubles.

I originally thought of the idea of adapting Humans vs. Zombies into game form after playing in my first game last year. At first I wanted to make an HvZ-themed board game or RTS, but I decided the fast-paced nature of the game lent itself better to an action FPS. The premise of the game is simple: you walk through the level, and shoot at "zombies" (wooden boxes used to simulate enemies) as they pop up. The faster you shoot them, the more points you get.

I tried to emulate the sensation of playing a game of HvZ from a Human's perspective as much as possible- right down to the Nerf gun and darts. The gun you use is based on the Nerf Maverick revolver-style weapon, and the rate of fire, speed, distance, and trajectory have all been tweaked to simulate handling a real plastic piece. I also worked in a sticking mechanic to the suction cups on the darts- hit a wall or an object with a shot and the dart will "stick" to it. 
Most of the complex models were made in Blender and imported, and the textures and materials were drawn/scanned in Photoshop, or edited from standard Unity assets. Since this project was conceived as a class project, the term "tech demo" probably applies in respect to level design. I built the level to show off as many different set pieces as possible in a relatively small space. I threw in scenic vistas, physics, water and lighting effects, wind, particles, normal mapping.... all sorts of eye candy (needless to say, I took full advantage of the Pro version of Unity installed in the school labs). I also sprinkled pop-up text throughout the level, to keep the player on track and help guide them through the game world, as well as introducing the various gameplay mechanics.
hereI've also uploaded the current game doc here.
The game starts by dropping you into the school's parking lot, and gives you a brief introduction.
Here's an example of the darts' sticking mechanic.
The pavement and brick surfaces are both normal mapped. The light source is a "sun" placed high and to the right of the stage, to simulate dusk-like light levels. The trees are modified versions of the Unity tree template, hooked up with some subtle wind attributes.
Another popup, explaining the controls and objective of the game. The crosshair can be toggled on/off by pressing 1.
The "zombies" pop up through the ground, and the faster the player shoots them, the more points they earn. The HUD items have been minimized for the sake of showing off the rest of the game; for practical reasons, they'd take up much more real estate on the screen in a final version.
The "zombies" have rigidbodies attached as well as colliders which react to colliders on the darts. When struck by a dart, the zombie dramatically falls to the ground....
....Like so. The zombie then flickers and disappears. One issue that gave me a lot of trouble was getting the dart to stay stuck to the zombie as it fell to the ground. I ended up using empty game objects and coding some swaps of inheritances between the two game objects, in order to get the dart to stick to the zombie and stay stuck, and then disappear along with its zombie.
It is pretty sweet....
This bridge overlooks a tree-lined river on the left, and a giant lake on the right (crappy wood texture added to enhance contrast with the other, better-looking textures).
You can sort of make out an easter egg I threw in. There's a little island with a zombie on it you can't hit, and he only pops up when you cross the bridge.
These trees all have the same subtle wind effect going, so as you watch, the forest canopy sways to and fro. The river wraps around the bend and into the distance. The water is also cranking several reflective and refractive effects (this is Unity Pro water).
You're pretty high up above the ground on that bridge.
The path beyond the bridge takes you to a twisting path swathed in dense foliage. I had also originally hooked up particle effects to create some fog to make visibility even more difficult, but I had to disable it because it was causing playability issues. But even without the fog, zombies popping up along this trail will still take you by surprise.
After the trail comes the pit, a big ol' sump filled with sand and perfect for a zombie ambush....
....Once I have the time to code swinging routines for the zombies to spawn into the pit with.
The only way out of the pit is through the rusty old sewer pipe on the far side.
There's a hole in the pipe wall where you can get another sweet view (also another great place for a zombie ambush).
For now, the game ends when the pipe spits you out into a deep pit with a kill screen. Anti-climactic, yes, but eventually it'll be replaced by a proper level finale- including a change from dusk to nighttime lighting effects, and a full-on zombie onslaught. And helicopters. Zombie-killing helicopters.
Here's a close-up shot of the dart object in the Unity level editor. There are two components in the dart: the normal-mapped foam dart body, and the suction cup surface where all the scripting and physics properties are attached.
DEVELOPMENT: Humans vs. Zombies: The Video Game
Published: