Zombie Game

Categories: Game, Unity, Zombie

As everybody else, I have at least one friend wanting yet another zombie game. So I’ve started making some initial tests for a small fpZs. It is inspired by the prison from the walking dead. So as I see it now (will change over time, as always) I’m going to place the player in the middle of the compound with a rifle, and make zombies storm the compound from all sides. You have to dispose of them before they overrun the inner part of the compound.

This will be the first time I work with 3d charater models, ragdoll and animator. which from time to time have resulted in some very funny and fustrating bugs. One bug that took days, was the ragdolls fell to the ground as expected, then about 5 secounds later they would, for no reason, jump into the air. This would repeate with increased force each time. It turned out to be a collider and rigdiget body element I had added, before adding the ragdoll to my charater. I removed the collider and rigdigetbody, and everything worked fine.

Adding the animator was a challenge, but after watching “Unity 4.0 – Mecanim Animation Tutorial” from Unity3D, which gave me a good introduction into the workflow of mecanim. I was able, in less than an hour, to set up a 3d model and make it run on the spot, but non the less, run. 🙂

Stopping the animator and making the model go into ragdoll mode should be easy. Stop the Animation, set all the elements IsKinematic to false and let the physics engine take over. But again something weird happened, when I shot the zombie the animation stopped and the character started to fly around i big circles. Very weird, but kind of funny looking. It turned out that I disabled the animator, stopped it, and then set IsKinematis to false each frame. which did something strange to the physics engine.

I know I have to start over on the model and the ragdoll setup, to make everything match up a lot better. As I didn’t make the model I got a bit confused about what was shoulder and what was forearm, so the ragdoll feels a bit weird, but it works.

Next I’ll be working on the movement of the zombie, to make them move from A to B avoiding the other zombies. I plan to base the algorithm on the work of Stephen. J. Guy, Jatin Chhugani, Changkyu Kim, Nadathur Satish, Ming C. Lin, Dinesh Manocha, and Pradeep Dubey in their 2009 paper, ClearPath: Highly Parallel Collision Avoidance for Multi-Agent Simulation. They made this video to explain the algorithm and to show it in action.

Visit their page where you can find the video and their paper on the subject. http://gamma.cs.unc.edu/CA/

First of all I’ll of cause try to do it all only using Unity physics using basic colliders, to see if the above algorithm will be needed at all.

Until next time, keep making

– Henning

«
»

    Leave a Reply

    Your email address will not be published. Required fields are marked *