This week I worked further on getting the building interiors modeled. There are 15 building types in Zombox right now, and as the procedural city generation system generates buildings during load time, each building gets a random interior relative to its type.
I also worked on the interaction system. In Zombox, my goal is to maximize the number of ways a player can interact with the environment. Doors can be opened, closed, broken down, barricaded, etc…objects can be destroyed, searched, used as storage, etc…and obviously there has to be a way to alert the player when something is examinable.
This week I’ve been working on a few things in Zombox.
Firstly, interiors have been designed for many of the building types. I’m about halfway done the modelling stage. In total there are 15 different building types, each with two interior variations.
Secondly, I added a button at the top let of the main UI that allows the main camera to be rotated up or down, so it’s easier to see what’s happening when standing behind walls or other obstacles. Some players might prefer the top-down view altogether.
Posted in Items, Zombox on October 15th, 2011 by Tyson Ibele
This week I worked on character customizations within Zombox.
The main character can now be dressed in various clothes, including over 60 hats, shirts and pants. Each clothing item provides a unique bonus to the character’s stats. Some items provide extra armor, some provide extra hit points, some increase speed, some increase the chances to land a critical hit, some increase attack and others regenerate health.
The clothing items, like all items in the game, can be found throughout the world.
Someone in the Unity forums asked me how Zombox maintains performance even with all the active colliders and rigidbodies within the environment. I figured it would be a good time to explain some of what goes on behind the scenes in the Zombox engine.
The game uses a fairly complex pooling system I wrote to create the environment.
Firstly, because everything in the game procedurally generated from a small set of prefabs, I can easily enable/disable anything that is not directly within the view frustum. Not just disable its renderer…but literally remove it completely, and use its gameobject to create something that *is* in screenspace. This means the total number of active rigidbody/static colliders in the game is limited to what’s visible in screen space, because only a finite set of gameobjects are used to create everything. The entire city features over 350 buildings (each with many walls, props, etc….about 40,000 different “pieces” are required to create the whole city), many roads, rivers, etc…but all of that is generated using only 300 gameobjects, which are recycled constantly. This keeps the game running really fast and there are no load times in the huge sprawling environment once the initial city-generation load time is passed (and that initial load time only takes a few seconds).
This week’s work on Zombox was sporadic and mostly behind-the-scenes.
The biggest changes are the following:
-weapons can now damage the environment. Got a hammer? Smash down a wall. Got an axe? Chop down a street light.
-zombie AI and flocking algorithms have been improved. Zombies no longer intersect one another while crowding around the player
-zombie pathfinding has been improved. The A* algorithm now runs in a co-routine so it can process a path over multiple frames, lessening the load on the CPU and allowing for longer paths to be calculated
-objects and enemies can be pushed in the water now. They’ll splash and drown but so can the player so you shouldn’t go too close to the edge!
This week I had some time to update the weapons and crowd dynamics of Zombox.
There are now different types of zombies…some are smaller/weaker/faster, others are larger/stronger/slower. Some are wearing helmets or protective gear and have more health, others carry simple melee weapons and can deal more damage.
Also, the zombie flocking algorithms have been updated. Zombies now flock around the main player more dynamically, and can be pushed out of the way as you move forward. The zombie physics system has been updated so that certain weapons and attacks can knock zombies back causing them to roll around and knock into nearby scenery.
All weapons have been updated in various ways. Melee weapons will drip drip more blood after hitting a zombie, push the zombies back more and their collision systems are more precise. Firearms do less damage from greater distances, can fling zombies backwards, and sharp projectiles that shoot out of certain firearms (like crossbows and nailguns) will stick into zombies and other hard surfaces. Also, the special taser weapon will electrify zombies, dealing secondary damage over time. Critical hits will cause blue sparks to emanate outwards from the affected zombies, giving subtle visual feedback on the level of damage dealt.