Crafting stations…

Posted in Items, Zombox on February 26th, 2014 by Tyson Ibele

Here’s a teaser of some of the new crafting stations you’ll be able to build in Zombox. After you build or upgrade each one, you’ll be able to craft many new items.

Can you guess what some of these will be used for?

Items on the ground…

Posted in Items, Zombox on February 21st, 2014 by Tyson Ibele

So, since the inception of Zombox 3 years ago I’ve wanted to make it possible for items to lie on the ground, outside of any particular container they could be stored in. This is a standard element of many RPGs like Diablo, Torchlight, Minecraft, etc.

The reason that this was never possible in Zombox (up until now) is due to the sheer number of resources required to have an implementation of this idea work. If the actual item geometry is to be displayed on the ground, that’s a lot of extra polygons that an iOS device just wouldn’t be able to handle. If a graphical representation of the item is to be displayed (like, its GUI icon), it would require a lot of draw calls to display each and every icon that is dropped…and every draw call is another hit on the GPU, which would quickly slow the game to a crawl. Batching wouldn’t work on those icons unless they were using a texture atlas, and updating UV/vert lists on a mesh to match icon/world coordinates would be slow.

But then I realized that I could use a particle system to do all of this quickly, and in only 1 draw call. The solution is a bit of a hack that requires “freezing” particles at particular frames on a texture. To elaborate, Unity allows you to tell a particle system to cycle through cells on a texture sheet. This is how animated particles are created — you create a texture sheet with a grid of cells, each containing a different frame of animation. Then you tell Unity’s particle system to cycle through the cells at a given rate, which results in an animated particle texture.

Well, if I create a texture sheet that contains all of my icon textures, and then tell a particle system to advance to a particular cell of that texture sheet and freeze there, I am able to achieve the effect of individual sub-textures of a texture sheet displaying properly on individual particles. Once that’s done, the rest is easy.

So…as a result of this new system, several new things in Zombox are possible:

  • items can be dropped or picked up, anywhere in the game world
  • objects that contain items drop their items on the ground when they are destroyed. The dropped items will be degraded in the process, though
  • when a player approaches an item on the ground, the item will hover around the player, alerting the player that they can examine the item
  • zombies and npcs will now drop their items/weapons when they die. Thus, their items/weapons can be retrieved by the player following their death

Click here to see a scaled-down image of the particle texture sheet I created, which stores all item icons within it. This is the texture that the particle system which displays all dropped items references.

Here are some animations showing various player interactions with dropped items:




Always backup your data…

Posted in AI, Press, Zombox on January 25th, 2014 by Tyson Ibele

Some of you might remember the story from a couple of years ago where the creators of Project Zomboid had their laptops stolen, causing a major setback in the game’s development at the time.

Well, yesterday the house I live in was burglarized and (among many other things) 2 of my laptops and my main iOS development testing phone were stolen. I haven’t lost any Zombox code because it’s all backed up off-site…but losing the devices (especially the iPhone 4S) still stings. Had I not been careful to keep the game code backup up elsewhere, the ending to this story might have been much worse.

So this is a reminder to everyone: keep your data backed up off-site!

In other news, I’ve transitioned over to using UnityVS as my IDE instead of relying solely on Notepad++ to write code and in the process I’ve converted all Zombox code to C#. So…no more JavaScript! Compile time is now faster, code is cleaner, etc…having worked with it enough I now much prefer C# over JS.

I hope to have some more substantial Zombox updates to post soon…currently working on fixing some annoying AI bugs that are proving very difficult to solve, so I don’t have much to show for that yet.

AI update…

Posted in AI, Characters, Zombox on December 27th, 2013 by Tyson Ibele

So now that the old navgrid pathfinding system has been replaced by the new navmesh system, I’ve gone in and re-written all of the AI code for npcs and zombies.

The old code was messy and relied on too many navgrid functions to simply adapt to the new system, so I started fresh. I’ve now unified all AI-related aspects of the zombies and NPCs (rather than have separate AI code for each), and optimized things like the flocking system and Line-of-Sight checking (using kd-trees and BVH trees, respectively). This allows the game to run faster with more zombies on screen at once.

While the iOS version of the game will typically have around 50 zombies visible at a time max, I benchmarked the new code with 650 zombies at once and it still runs at +30fps. Keep in mind the old code could handle around 200-250 before getting too laggy. So it’s quite an improvement!

Here’s an animated gif showing part of a group of 500 zombies crowing around the player/environment, using the new AI system (keep in mind for illustration purposes, their attacks have been disabled):



Navmesh info…

Posted in AI, Procedural world, Zombox on December 13th, 2013 by Tyson Ibele

Here is a short illustrated write-up explaining how navmeshes are generated per-tile in Zombox. The illustration also demonstrates how non axis-aligned obstacles are handled.

Testing the new bicycle rig…

Posted in Items, Zombox on December 9th, 2013 by Tyson Ibele

…apparently it needs some work.


October/November development info dump…

Posted in AI, Characters, GUI, Items, Procedural world, Zombox on November 29th, 2013 by Tyson Ibele

So it’s been almost two months since the last update…I guess that means it’s time for a new one!

I’ve done a huge amount of work on the game in that time…’s an overall outline of the new stuff, followed by detailed explanations of each one:

Front-end features:

  • weapons now have durability
  • individual items can now have perks
  • the ailment system (hunger, fatigue, bloodloss) was completely redone.
  • new shaders on everything allow for more precise damage decals

Back-end changes:

  • item import system re-written
  • character controller re-written
  • vehicle management system re-written
  • navgrid pathfinding replaced with navmesh pathfinding

Click any of the following images for previews of some of these changes, or click ‘Read More’ below to see all of the explanations in the full post.

Read more »


Posted in Characters, Procedural world, Zombox on October 11th, 2013 by Tyson Ibele

So, it used to be that when you’d jump in water you’d immediately die. But that’s no fun!! So….


As you can see, you can only climb out of the water if there’s nothing blocking the ledge in front of you.

Also, I’m verrrry close to having all of the refactored city generation code finished. Hopefully after that point, I’ll be able to post more frequent updates!


Building details…

Posted in Procedural world, Zombox on August 30th, 2013 by Tyson Ibele

So I’m getting closer to having the entire city generation engine re-written. It’s been a huge project (since it makes up a huge chunk of the game’s code and had to be completely re-written from scratch)….but the benefits have been awesome (as explained in previous posts).

In the process of re-writing the way that cities are generated, I’ve also changed the way that buildings are generated. Currently there are 15 different types of buildings (hospitals, houses, banks, stores, etc). Each building type had a specific custom interior (so stores have checkout counters, houses have kitchens and TVs, hospitals have beds, etc)…but in the old system the exteriors of the buildings were completely randomized. This means that a hospital might end up with the same roof and brick color as a house, etc.

The problem with that approach is that it becomes very difficult to tell buildings apart, without going inside to see the interior decorations. That also results in a very boring-looking city…where all buildings are essentially ‘the same’, in the sense that their colors and exterior decorations all come from the same set of options.

Since I’m overhauling the whole system, I figured it would be a good time to change how buildings are generated. Now, each building type has a unique set of possible walls and roofs that are specific to that kind of building. So, as you’re walking around the city, you can identify buildings by their exterior color and decor. When you see a steeple, you know you’re near a church. When you see an envelope sign, you know you’re near a post office. When you see a bunch of movie posters, you know you’re near a video store, etc.

Here’s a screencap showing a viewport preview of all the possible walls for each of the 15 building types.

Here’s a screencap showing a viewport preview of the possible roofs for the 15 building types.

As buildings are generated, first the ‘type’ of building is chosen, then its walls are taken from the corresponding group of possible walls, and then a roof is chosen from the corresponding group of roofs.

Here’s a screencap illustrating what a couple of buildings end up looking like, once their geometry is generated from the prefab objects shown above.

 Also for those who haven’t yet noticed…comments now require registration/login. It’s super easy to do, and avoids some of the problems that were happening earlier (with people posting under other peoples’ names, pretending to be them). If you have any issues with the registration/login system, or someone else has taken a username you previously posted under….feel free to contact me and let me know and we’ll try to resolve the issue.

What’s happening…

Posted in Press, Zombox on July 17th, 2013 by Tyson Ibele

Hey everyone,

So you might be wondering what is happening with regards to Zombox development. I mean, the game has been in development for over two years now! Why isn’t it out yet?

Here’s the short answer:

There’s a lot left to do, and most of my recent developments have been back-end stuff related to the new map generation system.

Here’s the long answer:

Zombox was originally conceived as a micro-game in which you walk around a neighborhood killing zombies and destroying property. It was meant to be a simple test to see whether or not I could make an iOS game on my own.

It quickly exploded into what it is today. It now features a rich character upgrade system, a massive world, a complex system of NPCs, dozens of zombie types, almost a thousand different items to find, buy or craft, etc.

The latest overhaul of features that I’ve been working on is a complete rewrite of the map generation system, to make way for the hundreds of new city elements. This is no trivial task, because the old map system was integrated into many different parts of the Zombox code base, so replacing that code is a complicated process. So far I’ve already re-written several thousand lines of code, and by the time I’m done, I’ll have added several thousand more.

In re-writing those sections of code I’ve also put a lot of work into making the map system much more efficient. As it stands, it’s about 20 times faster and uses 10 times less RAM. That will make a big difference on mobile devices, because it means the game will load very quickly and be less likely to crash (running out of memory will cause games to crash on iOS).

Now, that is all behind the scenes stuff that takes a lot of time, which means that while I am coding those types of things, I won’t have many updates to post here.

So, just because I haven’t posted an update, doesn’t mean the game is not constantly in development!

Now, that said, here are some updates that you have to look forward to, in the future:

  • Weapons will have durability, and must eventually be repaired or else they will break
  • Players will be able to swim for short periods of time in the water, even though it is toxic.
  • The prop-crafting system (for things like walls, chests, doors, etc) is going to be augmented with many new buildable items
  • Different types of workstations will be craftable, that will allow you to craft more advanced items. So, for example, you’ll need to build an oven to craft certain foods, or a workbench to craft certain objects, etc.
  • A power system is going to be implemented, that will allow you to build generators (which will require fuel) that can be used to provide electricity for more advanced crafting workstations.
  • Zone-specific NPC behaviors are going to be implemented. For example, in the military areas you’ll have to face aggressive soldier NPCs who might not be as friendly as the sewer NPCs or the random NPCs you might meet elsewhere.
  • Eventually I’d also like to add in things like NPC sub-stories and quests, but I haven’t put too much thought into those things yet.

I have other things on my to-do list as well, but those are the main things for now! I’m not sure how long it’ll be before I have some new content to post, but you can rest assured that lots of development progress is still being made!

In the meantime, I appreciate everyone’s support and patience!