Meaty blog today, and then some, but first… some housekeeping!
First item on the agenda: TIS are hiring! HOWEVER it’s not an entry-level position, or even a mid-level one really – the successful candidate will most likely be someone with considerable games development experience already. If you fancy joining our team and being our Animation Engine Programmer (and lots of other cool stuff besides that) then please check out our swanky new jobs page.
Second thing to mention: the 41.67 patch. This will be hitting an unstable beta very soon, and the changelist can be found here. The primary element of this update are corrections and adjustments to our newly implemented anti-cheat efforts, and likewise turning these off where not required in personal co-op servers.
Various levels of anti-cheat detection have also been provided for server operators, so if they find that certain anti-cheat systems are providing false-positives in certain circumstances they can turn their sensitivity down.
Third thing: IMPORTANT ALERT for those still playing on some elderly 41 MP betas – whether on a server or in SP. These will be taken away in the future, with your savegame then being bumped up to the current stable build – with the potential for savegame corruption.
The betas we are talking about, in particular, are those for 41.60, 41.61 and 41.65. Please rejoin the rest of the party on the stable build at your very earliest convenience.
And so, onto the rest of our Thursday blog…
After the new year we talked about how we were still puzzling over what the best first entry into NPC builds would be. We’re now in a more solid position to talk about what we have planned.
As mentioned before, we have years of NPC work behind us now. This is like a huge pile of really cool tech that’s not assembled in any way that functions as a whole: so what we talk about ahead should still be considered largely in the planning phase. However, it’s planning based on tech that all exists in a functional manner, and all proof-of-concepted to hell.
As stated in the 2022 and Beyond post though, we can’t claim any of it to be 100% complete yet. Plans could change, and we could still rein in a few of our goals for the first NPC build – depending on how progress goes.
So: here we will detail our overall plans with that BIG caveat in mind – and describe our overall goals for the Build 43 NPCs on a more macroscopic level.
During our discussions on what should be in a first NPC build we ruled out anything to do with Story Mode. After the hugely long wait people have had, a more scripted story experience that doesn’t intersect the main sandbox game just doesn’t seem right. We’re very keen on the idea of people playing PZ Stories, but we don’t want it to be overshadowed by disappointment of the lack of dynamic sandbox NPCs.
As such we’ve decided we’re going to go with the approach of a wide, but perhaps shallower, NPC release. We will have a ‘little bit of everything’, but the first build may be missing a lot of the content we’re planning.
We’re still piecing stuff together into a new branch of b41 from our immense NPC branch, as well as writing new systems, but we are currently planning a way to get NPCs to join your group, and for them to help with crafting, cooking building and hauling and other safehouse tasks. Likewise a way for them to provide combat support on your travels and NPC threats to look out for.
Initial implementation may just be a portion of what we have envisioned for future builds, using our current tech, so we can get a wide and satisfying NPC package in a reasonable time.
Regardless, that’s not what we’re going to focus on with this blog’s overview.
Let’s take in a more birds eye view of the main framework the NPCs are built upon. There’s also this twitter thread from Lemmy last week that gives some additional details.
The basis of how NPCs will work within the game has (unfortunately given recent tech industry fads and buzzwords) long long been called the ‘metaverse’ or sometimes ‘metaworld’. We’ll probably have to come up with a new name for it now. Thanks, Zuck.
The principle is that a large chunk of what makes them interesting doesn’t really involve some hyper advanced AI, but is more down to story-telling and writing.
How it works, is we have a simplified ‘storylet’ event driven system that will drive NPCs, events and the procedural narratives of NPCs – particularly when they are away from the streamed in game world.
If an NPC is at the other side of the map, at any give moment the code knows where buildings, rooms and roads are but it knows nothing about what tiles are where. 3D Zombies aren’t walking around pathfinding, doing bites and whatnot. Without the NPCs, it’s just a void peppered with information about zombie density, buildings and roads.
The ‘metaverse’ (urgh, damn you Zuck) is about creating a simplified and abstracted world outside the streamed in player area that they exist in. More like a complex choose your own adventure book for each NPC, with in-game context and numerous aspects of the characters involved’s personality, skills or situation that determine which page it jumps to next.
This is where we’ve been (as we’re sure you’ve heard if you’ve followed us talking about them) heavily inspired by Crusader Kings for how we’ll develop these NPC stories in a dynamic and interesting way.
We create a library of events that can trigger under different conditions, that are sufficiently abstracted and simple enough that they are relatively simple to implement once the framework is in place. These events can then lead to different paths to other events, the RNG chances of which are modified by simple factors such as if a character has a specific personality trait – or a specific weapon or skill.
Further, rather than a Crusader Kings event that pops up with some prose to read and physical buttons to choose an option, each of these events and the choices given to the NPC will be associated with a line of context-customizable dialogue that reflects said character recounting these events to another person in the future, so NPCs will be able to recount the horrors that befell them before you met, or report back after being away on a mission.
Characters can move in groups or alone between buildings along roads throughout the entire map, since we know where and what these are wherever the player is. Of course, though, they are not pathfinding around objects, fighting real zombies, opening and shutting doors. That stuff doesn’t exist outside the player’s screen. The simplified and event driven narrative system will approximate these actions, triggering little story narrative events that progress that group or character’s offscreen story, evolve the world and keep things interesting.
For example: imagine a character is moving between their safehouse and a building they plan to loot, and they move within range of another character within the metaverse. We maybe have a ‘two NPCs meet’ trigger, that could randomly launch any of a large range of story events related to this situation – each crafted to have interesting branching outcomes and are weighted by the personality traits of the people involved.
Does one shoot the other and loot their body? Do they join forces and ultimately become firm friends? Does one tail the other to find out where their safehouse is to tell his friends about? This is how we can have quite complex interactions between NPCs that for the most part purely come down to writer’s imagination, simple changes in state, setting story flags for later use by other events, and backed up by appropriate use of character personality traits and stats to skew the dice rolls of which direction the events take. There’s practically no AI involved whatsoever, in the traditional sense.
This is all, to this point of development, very much a framework that we have put together. Lots of systems tie into it, and it’s been an immensely complex set up process that’s taken years on and off during other development.
There’s not a lot of written content to fit into this extensive framework yet, or at least none implemented or in the correct structure to exploit without some work.
So the results we get out of this are still very much to be seen, however the tech and systems work. We feel encouraged that it will lead to some extremely interesting story generation that makes our NPCs feel like they are part of an unfolding zombie apocalypse story.
However, here’s the point the simple meets the more complex.
We have built up a lot of tech for NPCs that are in the streamed in area. Driving, combat, advanced behaviour scripting, threat prediction and simulation for combat movement, job systems and so on.
This said the MP rework we decided on, that’s now given PZ such a new lease of life, was intensely disruptive to the areas this aspect of the NPCs code relies upon. It will still be a substantial job porting the real visible elements of the NPCs over to work with the new B41 MP branch. The NPC code’s tendrils were fused into thousands of places within the game code that the team were dramatically changing in that loooonng 6, then 12, month rework.
This is the primary reason we’ve not been showing any videos made in recent times. Right now, until we’re confident that B41 is complete and won’t see any significant changes to the player code the NPC systems rely on, we’re focusing on other parts of the NPC build that are separate from this. Namely the aforementioned meta aspects, which don’t carry the risk of the significant time it would take to port it over straight into a big merge nightmare.
As such, here’s some videos that we took before the MP rework disrupted development to some degree.
First off, a video that show us stress testing with 500 NPCs around the entire map, all processing at once, looting and exploring. Within this you can see us switching to each one on the fly, and the game transition seamlessly from ‘meta’ to ‘real’ and back to ‘meta’ again. (Multiple on-screen NPCs start appearing halfway through the vid.)
Here’s another one with 400 NPCs driving around in cars throughout the entire map while an unnamed player badly drives around amongst them.
This system was built pre-curved roads, and as such the NPCs will need some added smarts to that shown here.
Note: We have a fair few other videos collected over the years, that we may show in future Thursdoids until we have more contemporary stuff to show. A lot of these, like the above, were recorded without the assumption they’d ever be shown publically, seeing as we were so deep into our NPC information blackout.
While perhaps interesting to people, they’re not necessarily of the most comprehensive or sexy things that we’d like to show off in Thursdoids. They were more made to show stuff between the team. That said, there’s a couple of particularly cool ones we’ll save for a rainy day when we’re more confident that what they portray will be appearing in the B43 build.
The big challenge, that we’ve made some inroads into in the past but will nonetheless be the main challenge in making this work as envisioned, is tying these ‘meta’ story events into what the player is seeing in front of them.
It’s one thing to have an event that transpires in another town where we decide that a safehouse member goes insane and holds another hostage at gunpoint. We write some prose for it if that character recounts this occurred to them in the past, have various branched narrative outcomes we decide upon and weigh based on the characters involved: job’s done.
But we also need to add a behaviour and scripted dialogue to that event so that NPC will actually visibly do these actions while the player is watching.
We have extremely powerful behaviour tree systems that can easily create deep and effective NPC behaviours that mimic player movement well. In fact, Lemmy wrote an article on behaviour trees back in 2014 that is still one of the main Google results on the subject, and we’ve learnt a lot more since then.
The tech is robust, and we have confidence in it. It already has a library of useful behaviours and more can be created easily. Nevertheless tying meta events to real world convincing behaviours that mirror those events remains what’ll be the main challenge.
The first stage is building this library of chainable events, and creating interesting emergent stories for NPCs and their groups, making this as vibrant and interesting as possible. On its own this is a huge step as it gives us a framework of the NPCs and the stories that can emerge from them to hang the rest on, but is not enough to give the player any kind of NPC experience.
The second stage, is going through these events and adding extra data for how they will be manifested to the player if they are involved with them, or at least if they witness them happening. Behaviours to play on the characters playing the roles of the event, dialogue scripts for the characters involved, and so on. Also giving the player the ability to play one of these roles in these events, choosing choices either by dialogue options, or by taking an action (shooting a gun, or running out of a room for e.g) and the game inferring from that the option they chose.
The last stage is making sure that we store information on buildings and areas of the map on events that took place there, to alter those areas when they are next loaded to reflect the events that took place there when the tiles were not loaded.
Did a horde attack a group fortified in their house? If so, we’ll need to add dead zombies, boarded up windows, and perhaps reanimated versions of the characters that died there. This will be an extension of the current Zed Stories system that has environmental story telling on houses and their occupants, or vehicles on the roads. Instead though, they will be using actual narrative events that occurred with NPCs in the world, to represent things that actually happened within the world’s continuing story.
It’s a LOT of work, but it’ll also be a focus for a large chunk of the team: outside GA’s ongoing focus on improving multiplayer, and our B42 crafting team working on the crafting update detailed two weeks ago.
We won’t downplay the fact that it’ll be a lot to cover, however again stress that B41 was a rewrite of large portions of the entire game, and we’ve said repeatedly that no build will ever be that gruelling again and we mean that.
Some 80% of this NPC build leans toward writing and designing of events and dialogue, the hardest technical aspects that success or failure rest on are mostly years behind us at this point. We have had substantial tech being built up over the years toward this very goal, and now comes the last (yet still huge and substantial) job of tying it all together, and our writing team writing narrative content in a way that can be used by the systems that have been baking for so long.
Having ‘gone wide’ with our overall aims for B42 and B43 in recent blogs, the next one or two will likely be covering more incremental feature and user experience improvements. However, we will be sure to share cool stuff as and when it emerges.
Thanks so much for reading, and please keep safe out there in these increasingly troubled times.
This week’s desolate scene from VICTU. A changelist of all our pre-release patches since the 41 beta began can be found here. The Centralized Block of Italicised Text would like to direct your attention to the PZ Wiki should you feel like editing or amending something, and the PZ Mailing List that can send you update notifications once builds get released. We also live on Twitter right here! Our Discord is open for chat and hijinks too. Here’s also a small italicised notification that PZ will be available on GeForce NOW in March. We’ll shout about it a bit louder when we know the exact date.