Indie Stone logo

News & Dev

It’s an NPC RELATED MONDOID!!!1 (No hype pls)

July 21, 2014

Yep, against our better judgement we decided that perhaps you’re all due a bit of a meatier update on the NPCs. Please read the following disclaimer before continuing:


Are we clear? Then let’s progress!

Where have we been?

First a bit of background into what has been going on with NPC development. The bumps in the road, the detours and do-overs.

About a year ago was the last time we had any significant progress reports on the NPCs. It’s been tough, simply because the NPCs, or rather the sheer ambition of what we want to achieve with them, is by no means a simple task. You could argue that what we are attempting to accomplish is something that’s very rarely seen in games, if seen at all. We know we have the capability, and we won’t compromise on what we want to achieve, and with that comes a cost. That cost is a quite gargantuan development time, with delays and frustrations both to our customers and to ourselves in the meantime. But the key point is that once we finally get over that development time, what we will have should breathe not only new life into Zomboid, but potentially give the game orders of magnitude more longevity and gameplay potential.

However its not always been plain sailing. One detour we felt we had to make was a rather major one, in which once upon a time there were three types character in the world. Players, survivors (NPCs) and zombies. This, a decision made extremely early on in Zomboid’s development when it would be difficult to foresee the direction the game would ultimately go in, turned out to be a bad move that would only become apparent years later.

Each of these three types had their own distinct code, with some inherited behaviour between them. However this caused severe problems when you consider the NPC codebase and the actively developed main codebase used for releases were two separate branches, diverged a long time previously. As development on the main branch continued, a whole ton of extra functionality had been added to the main game, and notably to the players themselves, and the survivors, separate, had become seriously out of date.

While efforts to cross merge across the codebases were made somewhat regularly, especially when NPC development had to be sidelined for any amount of time, it became increasingly difficult to keep the survivors up to date and in check since code added to players would need replicating. As well as this, with multiplayer an intended goal, developed in down time moments on a third branch (we do not have the luxury of single minded focused and uninterrupted development on one feature as such a small team) it meant that the NPC codebase had more and more difficulty staying relevant. Multiplayer turned out to be a much more achievable short term goal than we originally estimated, and there were reasons to release that first that go beyond this. Namely that to retroactively add multiplayer once NPCs were in would have been a complete brain melter and a truly terrifying prospect.

As such it was decided that a new approach was needed, and that being that there would be no distinction between players and survivors. NPCs would literally be players that had AI brains controlling their movement through the same mechanisms the player controls them, and with added code that allowed them to despawn into the meta-game and reassemble into flesh and blood as they approached an actual human controlled player. This would mean that from that point, any future development on players (say adding sneak mechanics, or more obviously the network code for transmitting players positions from server to clients) would come for free with the NPCs without any additional work. Hindsight is 20/20 and this is how it should have been from the start. Sometimes though these things don’t become apparent when you have 1000 other things to consider.

So some time was spent essentially transplanting code from the NPC branch into a new branch taken from the actively developed version of the game, and reorganizing it so that it would use player objects instead of the ill-advised survivor objects of  the ‘shotgun spamming mentalist NPC’ days. This took some time, and while a lot could be directly transferred with modifications, other bits needed to be recoded to fit within the modern code-base. This meant a lot of time spent with little tangible to show. But is now more or less complete, and the results have been wonderful.

Where are we at?

Some of you may have read, or at least tried to read, Lemmy’s AI post that featured on Gamasutra last week. It may give an insight into the sorts of things we’re fiddling with at the moment. Along with Binky’s video last week of the NPC’s zombie avoidance system. We’ve still got a lot of work to finish in getting all the metaverse scenes into the new NPC branch, but have made massive strides in the ‘Real’ NPCs that have far surpassed our expectations.

There are still plenty of glitches, and missing behaviours that need implementing, as well as human / human combat which needs a lot of work (we’re wanting to do cover points and all sorts of sexy goodness for this) but hopefully these videos will be encouraging (I should point out these videos are actually just shy of a month old, and pre-date Binky’s zombie avoidance, as well as various other more recent additions but we’re not really in a place to post videos from newer builds due to some heavy development on key systems) and that due to being over cautious in their safehouse, NPCs may be prone to walking backwards in places that its perhaps less than appropriate. These videos also focus purely on the actual NPC behaviours in the flesh and no NPC interactions or meta-game story events:

Other features currently in development include a trading system (think Steam trading but with Zomboid inventory items instead of games, snow globes and trading cards) that will likely be available for multi-player much earlier than a public NPC build.

Oh there is also this:


Where are we going?

So the things we’re currently working on before we feel we could even think about a release:

Kate and Baldspot – Getting the tutorial back in is a priority to us, however due to the increased fidelity of the game since the last time Kate and Bob existed, as well as the current lack of solid NPC vs Player/NPC combat code, means currently a Kate and Bob story would be difficult to pull off. We need to replace Kate getting dragged by Bob (with some resemblance to him pulling her along the floor by her hair) into something more believably animated, and we need to make sure Mr Collins knows how to deal with Bob once he goes off the rails of the tutorial scripting. There are a whole other bunch of things that need to be addressed before we could release even up to where we got to in the story with the last release.

Metaverse Event Scripting – While we have a good amount of scenes reintegrated, looting parties and various encounters and other events that will make the NPCs exciting and interesting beyond being zombie fodder. There are far more required before the NPCs could provide the kind of emergent stories detailed last year in the Tales of the Metaverse blogpost, and Will has written so many of these that we need to get more in to make the NPCs live up to their potential. While we are prepared to release the NPCs before they reach this level of emergent story telling, we would not be comfortable releasing them as they are now, even with the work completed to make them behave properly, as it would be seriously underdelivering what was promised, and we want the first NPC release to have sufficient bang for your buck to satisfy those who have waited so long. After such a long wait, it becomes self defeating to rush something out that would disappoint after all the hype.

NPC vs Player/NPC combat – With NPC vs zombies sorted, we still have a fair chunk of work left to make character vs character combat solid, and this isn’t something we can compromise on.

Trading – As stated above, we need to get a trading system in there for the first release of the NPCs, as this is a really clear advantage to having them in the game world.

 In Summary

There is always the risk that we’re reigniting the hype train, but please try and keep that all in check, as we’re still not as close to an NPC release as we perhaps intended to be before doing any kind of NPC released post. However progress has been great in the last month or two, and we’re all feeling massively positive about the results that we’ll have by the time we do release, and we figured it’d been long enough that people are perhaps due something meaty when it comes to NPC information.

We know it’s been a hard wait, but in the meantime there will be a lot of cool stuff to keep you going. Multiplayer signs and support for writing notes in multiplayer, many new craftable furniture options, an a significant map update in the works (though this again is likely not imminent), and vehicles (again no ETA on that), there will be no shortage of other features to keep people busy until NPCs finally drop. Oh it will be a good day, and its coming. It just pays to remember that every moment they are not being released will only make the results better and more worthy of the wait.

We’re going back into the dark with NPCs, and will not likely do any more Mondoid coverage for another month or two before their release feels more imminent. This one was an exception, just to keep everyone up to date and assure them that NPCs are indeed under development and making progress.

Thanks everyone for your support, and we’re really excited about the future of Zomboid, and always touched to see such support and love on both our own and our Steam forums.

REMEMBER, YOU CAN NOW SUBSCRIBE with several options to receive either release notification e-mails, unstable test release notifications, and even receive Mondoids right to your e-mail every week!

Click here to sign up!

Related Posts