Eggys Games Banner

Making a Full Zombie Survival Game in Unity

Article Picture
Share on :
Facebook PictureTwitter PictureReddit Picture

I was a huge fan of the original Black Ops Zombie mode in Call of Duty. I would play it every day for hours at one point. I thought what if I made a 2D version with a few spins on it? I always love seeing 2D versions of games. So I set out on the long adventure of making the game - Eggbot vs Zombies

Eggbot Game Article Screenshot

Main Game Mechanics

Going into this game was pretty daunting to begin with. Right from the get go the graphics were a whole new ballpark than what I was used of. I had to learn about Unitys lighting system, but once I did it turns out you can take oldschool Flash graphics and by simple adding lighting they become new age immediately. This was cool!

I also then used Unitys particle system to create some new effects like explosions. With AAA looking explosions and smoke effects placed around cartoony graphics you can achieve some amazing immersion.

On top of that I added ragdolls for the enemies and physics on shooting lights to make them move. Ahhh immersion overload! nice!

The game of course was the usual game idea from Cod Zombies. Unlock doors and survive as long as possible except I added a shop for the guns so you could change the frames for the guns.

Eggbot Grav Gun


The games code got very massive. It started off with having to make the raycasts. This was the first time I had used a raycast system and I found it quite simply to use once you got the hang of it. You could do a lot with it and create really fun shooting. I simple shot a ray cast out and added an offset to the x and y for accuracy. Then if it collided with ground, it made a spark. If it hit an enemy it made blood and took away hp. It had a lot of nested if commands which isn't the cleanest code but it didn't need much more than that.

I made the game fully open source. You can download all of the code on my github here -

Eggbot vs Zombies Github Code

Raycast Coding

Overall Game

I loved the graphics style when I put it all together, I made a black silhouette style for all the background and then layered over Unitys particle effects to make snow and smoke. This really brought the graphics to life in a beautiful way.

Eggbot vs Zombies Main Menu

The game was received really well and is very popular online as a browser game. I might make a sequel at some point since people keep asking for one!

Hope you enjoy playing - Eggbot vs Zombies.