DAYZ

Scroll to Info & Navigation

The challenge and saga of Zombie Pathfinding

This devblog will be focused on describing the progress with one of our biggest issues: Zombie Pathfinding.

Development Priorities and Pace

Our major focus has been on establishing the architecture, both in the team and in the game, in order to deliver best in the future. This involved us drastically increasing the size of the team working on the game. This had a severe short-term impact on our progress as our existing team had to devote time and resources to training and planning. The new zombie pathfinding is a good example of this approach beginning to produce results.

Some examples of future major changes coming as a result of this new focus:

  • Entirely new rendering system (allowing potential upgrades to DX10 or DX11, ports as well).
  • True multithreading / multicore for servers and possibly clients.
  • Completely new animal AI that mirrors an actual animals behaviors.
  • Redeveloped “action” system, replacing the mouse-wheel scroll action system.
  • Complete refactoring of the inventory system. While not a big change for users, possibly allows some more advanced systems to be implemented and better performance and less bugs.

Background

Zombies have proven to be one of the most difficult to develop components of the game. When we were developing the game we realized that in the time we had, we would need to work within the parameters of the AI already in the engine. In the engine, AI is calculated on a “per agent” basis, with some caching for things like targets (shared target info, etc…). In the mod, this was dropped in favor of calculating visibility and target info on a “per player” approach. This meant that zombies in the mod were simply pawns, activated by players moving around.

In addition to behavior problems we also experienced problems with pathfinding and collision for the AI. We were getting the engine to do things that it was never designed to do, especially regarding interiors of buildings. We attempted to refactor these solutions to accommodate our changes but, as can be seen by playing the current build, they fell short of our expectations. In the end we decided it would be easier to develop a new approach from scratch.

The Challenge

There are many exciting solutions available for pathfinding, it’s fairly standard fare in the video gaming industry. Our problem was not unique, but our situation was: our world is very big yet it requires the same precision as a small one.

The team devoted to solving this decided to use navigation meshes. The serious problem it presented, though, was how to generate these meshes, with nearly 2 million objects on the map doing it by hand would not be an option. So a method was devised to split the world up into grids, and then raycast at a precise interval and generate chunks of navmesh. This is all done during the packing process and “baked” out into data that can be read by the server and client. This uses the wonderful approaches outlined in the open source navmesh project Recast and Detour.

The Results

I spoke to Martin Slavkov, programmer behind the solution, to help me outline the result with some screenshots.

Generating the Navmesh (view Imgur Gallery of generation)

image

A small program was developed to read through the world, load all the objects, and then work its way through tracing billions of lines to calculate the ability to move. This then works out not only where outside you can walk, but inside as well. It gives great precision while still working for a very large scale world both indoor and outdoor. Having a unified solution for pathfinding makes implementation much easier.

Use in-game (view Imgur Gallery of navmesh in action)

The engine is then able to load the chunks in as it needs. It does use some memory (around 600mb extra, maximum), but it only loads the chunks it needs. However as we are moving to 64-bit on the server side, this reduces any potential issues with memory.

image

Performance optimizations can be very significant. Currently the team are working on parallelizing the AI pathfinding function so it can operate on a separate core. With all new functionality we are developing in this way, unfortunately that means that it can take longer for us to develop but the results for performance can be massive.

Previously two different systems were used for navigating AI. The exterior one handled navigation around static and dynamic objects, and an internal “path” system was used for building interiors. This involved artists defining paths that AI could follow. We had to drop this interior method because of the massive performance issues with large numbers of agents.

image

In the screenshot above, you can see a path between two red points. Because the system is now unified it means that more efficient (and more natural) pathfinding solutions are available to the AI, at a fraction of the performance cost as before.

Report from the Lead Artist, Chris Torchia (View Imgur Gallery of new art)

I’m happy to report on the loads of content which will soon hit experimental servers. Recently the Prague and Bratislava studios had our first meet and greet so I was able to get a first hand look at all of the ongoing work by the artists and animators on our new animals. We have a basic implementation of prototype animals that will be swapped out by our Bratislava artist’s work which is looking incredible!

Improvised fishing tackle and a carp were created, which players will be able to catch in ponds. We have also created some filet models which you will eventually be able to cook. This will all add up to be a literal game-changer. Speaking of animals - we also met Big - the office pet tortoise in Bratislava. Hm, that gives me an idea…

Our character artist is further expanding with the addition of a new large-capacity police vest to go along with our ОMON-inspired Орёл uniform. We have also started working on EMT, Firefighter, and finalizing the Gorka uniforms.

Fireplaces, Hunting, And being a lumberjack!

We pulled fireplaces and hunting from the previous update in their state at the time, we felt they would hinder gameplay not enhance it. The extra time has been spent improving gameplay aspects and also identifying how we can better support it.

The build to experimental will show the basic structure of how this will work. Chopping wood from trees now gives logs, and after a certain time, the trees will be “expended” and fall over. Tree cutting is done by holding an axe in your hands, and using the mouse-wheel action menu. This is a prime example of why we want to remove the mouse-wheel action system. Instead of this, we envision you simply hitting the tree with the axe and being rewarded with wood - but that is for the future.

Fireplaces can be upgraded with stones, which are recovered from the ground around rocky areas or by hitting rocks with a pick-axe. Fireplaces can be crafted by making a “fireplace kit” out of items such as rags and kindling. Kindling is recovered by searching the forest floor for sticks. All these scavenging aspects need more refinement as part of a new action system, but they’re exciting changes that will pave the way for more complex systems such as horticulture.

Bratislava Team Visit (view Imgur Gallery of the visit)

We visited our team in Bratislava -  they have a TURTLE!

The next update

Our current targets have us putting out builds to stable once a month, a huge inspiration for approach we aspire to is Prison Architect who do this very well. We have no set timeframe for experimental releases, these are done to assist us with preparing for stable releases.

Above all else, it’s vital that people appreciate several things:

  • Different tasks take different amounts of time
  • Priorities for tasks are built around what is needed based on dependencies, not what is most needed to satisfy the game design
  • Scheduled builds are targets, not absolutes. We will delay and postpone builds where we are not confident in their status.
  • Devblogs are no longer scheduled weekly, and are done as often as we can to provide background for our progress.

The Final Word

This is an extremely exciting time for us all as we come out of two months of very aggressive growth. We’ve expanded the team a great deal, taking a huge risk in doing so. That risk is paying off, and we’re excited to see the massive impact that the pathfinding and collision changes will have on the DayZ experience.

Experimental Branch saw many changes in 0.44, which have been released on stable. Two very important changes were improvements to multiplayer netcode and an entirely new mouse control system that removed the previous one based on mouse acceleration.

We’re now continuing our work optimizing and bug fixing, while others in the studio work towards new functionality for hunting and survival.

Respawning Loot Experiments

We have been gathering a huge amount of metrics around loot spawn and distribution from the experimental servers, culminating in a test of an engine based loot respawn system last night on experimental. Out of this we identified some very significant optimizations we can make to how loot is managed, and also identified how we can make loot respawn.

These changes will flow in over time as we are planning to do this in iterations. Most important for us is to allow loot to respawn, even just at a basic level. Once this is done we will focus on persistent items (backpacks, tents, potentially even all or most items). Finally we will focus on globally managed loot.

Graphics Optimization and the Renderer

Work has commenced on disconnecting the renderer directly from the simulation. This would then free us to change (or even replace) the renderer much easier, allowing greater optimization and new functionality such as better particle effects. We have no timeframe for this completion no any specific goals beyond preparing it for future goals, but it’s exciting for us to start this work.

This work will offer us the potential for future very significant client FPS optimizations, such as better scene management, to solve issues people experience such as low FPS in cities.

Network out-of-sync problems

We are also looking at various out-of-sync bugs and other issues posted in the dev tracker. A great deal of progress was made on some issues with the 0.44 patch, so we encourage those having serious network problems to try out the game now with the new update. Many of the remaining issues (such as rubberbanding) are related to low server FPS that will be fixed with performance optimizations.

64-bit Server

This is now fully compiling and ready for test deployment. We are currently scheduled to test this deployment on experimental next week. While it is unlikely to improve performance of the server, it will remove memory limit problems we previously experienced (particularly with the growth of ragdoll and physics in general on the server). It’s also a huge milestone for us in other areas of work focused on making the dedicated server environment much more robust.

From the Lead Artist, Chris Torchia

I’m really happy with the direction of the artwork in DayZ and have to point to my great team of artists who make it happen. Its been another busy week for us and I can’t wait for you guys to see all the new content on the way.

Character Art

We just finished a basic police uniform inspired by some combination of Russian DPS and our local Mestská policie (affectionately known as the Hicks Unit for their enthusiasm with issuing tickets to our own Brian Hicks). We’re starting to play with OMON-inspired riot police uniforms but its a bit too early to show anything. We’re also working on a GORKA-E uniform in multiple patterns and we’re hoping to pick up the pace in this department as we welcome a new full-time character artist to the team. 

Environment

The team would like to focus now on some signature objects to spice up the vast environment and make the new explorable areas more unique.  We’ve just finished a new office building and will start an ornate municipal building which will serve as a land mark in a new large city being constructed by the map design team.  This city, called Novodmitrovsk, will have an industrial zone and is very close in size to Cherno or Electro but located in the north of our terrain.  We’ve also created a ‘graveyard set’ of various objects so the map designers can enhance the gloomy atmosphere.

Animals

Our Bratislava studio is wrapping up the first batch of animals requested by the game designers. The studio’s own animators and programmers will soon begin work on animal AI and animations to deliver an authentic experience for our players. We’re also working on a prototype fish model and an improvised fishing pole as requested by the designers. As an ourdoorsman myself, I’m really looking forward to seeing these survival features develop. 

Weapons

The venerable AKM is nearing completion I don’t want to be held to a specific date for when it will be released to experimental but it won’t be long.  I just tested out the PSO1 scope with a 75 round mag dump.  What have I done? I’ve created a monster! Also, we’ve completed a pistol that I think will give players some new gameplay options. It fires a .30 cal rifle cartridge and comes with a long eye relief scope. We’ve simply taking to calling it the Longhorn.

Animations

Viktor, our animation lead reports that his team was focused mainly on bug fixing in the past week. Many new hand poses were added for items so the player is holding them properly. They’ve also been working on reload animations for the P1 and Longhorn pistols, and AKM. At the same time, the programmers did a great job for allowing synchronization of animations between the bowstring and character hand.  It will also sync across the network since we feel its important for other players to know when the bow is drawn and when its at rest. It’s been a pleasure to see this develop over time and its only going to get better.

A very busy couple of weeks for the whole team has just ended. Everyone has been preparing for our next big update, scheduled for sometime this month. Some highlights outlined in this post.

Guaranteed Updates

As previously mentioned we want to move from the current situation where the client and server “spam” messages at each other, hoping that some of the messages get through. Because they can’t be sure, the updates have to be sent again and again. This is believed to be the major restriction from breaking the 100 player limit. We anticipate this will be appearing on experimental servers next week, and then onward into the update for this month.

Fireplaces

We’re ready now for our final implementation next week of fireplaces and the ability to light flammable objects on fire. Many visual updates and changes to the engine have occurred as part of this and we’re now making the mechanisms for players to decide where and how to make fires and how to light items on fire.

Physics and Throwing

We will be deploying this to experimental next week to gain some more feedback on its implementation. Progress on ragdoll has been steady although this is unlikely to be in experimental next week and will be ongoing for some time. A new animation system and animations have been made that allow you to “power” up your throw, the same system is used to allow you to draw your arrow when firing from the bow.

Player Mouse Control

Many players have outlined how much the mouse acceleration/controls need to be modified. Players head (view) will move instantly with raw 1:1 mouse feedback. Weapons may “lag behind” depending on how heavy and cumbersome the weapon is. For example, players with a pistol will be able to turn around and fire much faster than a player with a M4, or a chainsaw.

This represented a great deal of work and the complete replacement of the old system, therefore some bugs and plenty of tweaking are expected.

These will be deployed to experimental next week for more player feedback.

From the Art Team: Chris Torchia, Lead Artist

We’ve got our team working in so many different areas its hard to write a small summary of all the work.  

We’re wrapping up our part with archery and have a nice looking improvised bow and crossbow to release soon. Our animators have been spending time in the mocap studio to get accurate drawing, firing, and reloading animations for them and its looking great.  

Our new studio in Bratislava has been hard at work making some of the new food items which were shown by Dean at Rezzed as well as create all new wildlife models and we’re hoping the combination of archery, wildlife, and campfires will create a unique survival hunting experience for our players.

As for firearms, the P1 pistol is complete and configured in game. The same is true for the AKM but we need to spend some time polishing some of the rough edges before adding them to the loot tables and pushing to public. We’re finally going to implement stripper clips with the mosin and sweep through and tweek some of the firearm cfg values. As well, a little project I’ve kept under wraps is nearing completion. The first SMG in DayZ game will soon be ready and I hope you all will like it.

For character art our talented artists have created a couple new player heads for more unique looking characters which we’ll add in soon.  As well, we’ve made a Soviet-style officer hat and the tracksuit!  Next up, we’ll look at police, EMT, and firefighters.

Lastly, our environment art and map teams have continued to create new, interesting buildings and objects, as well as expanding the number of explorable towns, with the addition of Karmanovka – a town containing over 3000 objects!

Weekly Report: Smashing Bugs for 0.37

This week saw us start our “survival” gameplay focus. This means most of our gameplay development focus is on refining the survival aspects of the game. We detailed some of the initial work for this last week.

Trying to get 0.37 to stable

Our main focus this week was to deploy a new version of the game to stable branch. We have two public “branches” of code, stable and experimental. A deployment to stable branch of the latest version of the game was scheduled for Wednesday, however we were not happy with some of the issues that remained.

Three major code changes have been occurring. We have been changing the way collision works to solve a number of bugs, such as shooting while prone colliding with the world and zombie collisions. Also our new physics system has been implemented, allowing us to have throwing, dragging, ragdoll, and even vehicles. In addition, a new guaranteed network message system has been developed to solve network issues, improve client/server performance, as well as reduce the “desync” issues experienced by many.

A number of bugs came out of these developments, two of which cause situations where players and zombies can become invisible to some clients. We want to solve this issue before we deploy to stable. You can try the current version out for yourself on experimental branch.

Survival Cooking

Progress continued with the development of several different kinds of fireplaces, and has moved onto creating assets for constructible ovens. These items will be persistent in the world, allowing the player to cook many things. The temperature system developed in the engine has been refined to have correct return from hot or cold to ambient temperature.

Survival Combat

A new area of work commenced this week is combat directly supporting survival. This includes throwing items, bows and arrows. We now have a great new animation for throwing, and the system developed for this will allow us to support proper animations for bows (e.g. drawing bow back, awaiting player input to fire).

The next week

Both Survival Combat and Cooking are our gameplay focus for the next few weeks, with our primary goal to get 0.37+ deployed to stable as soon as possible.

We’re also looking ahead further now towards how to best position ourselves to release vehicles, barricading, and advanced physics. It’s exciting times for us all here and we can’t wait to show what’s coming in our next video blog!

Screenshots from today’s multiplayer test - a teaser for the devblog that is uploading to Youtube right now. Thanks for the forum and reddit moderators and Dyslexi who helped out with the testing.

Please note:

  • All shots are taken during a multiplayer, pre-alpha test
  • There is still no set release-date for DayZ Standalone

Highest Devblog update in the world

image

Dean “Rocket” Hall during his Puja ceremony today, proceeded by a local lama. Flour is spread on each others faces, hopefully signifying the individual reaches old age.  Rocket is completing this devblog from Everest Base Camp during his attempt on the summit of Mt Everest.

Devblog from Everest base camp!

I’ll start with a huge thank you to the DayZ development team who have continued development at a breakneck pace despite me being off living a lifelong dream to climb Mt Everest. Although the timing is poor for my sabatical, it is not something planned on a whim and involves non-refundable costs of up to $100k.

So here I am, at Everest Base Camp, 5400 meters, writing what I am sure is the highest ever devblog from the ground! This is largely able to occur because of Matt Lightfoot, the youngish looking chap who is our tireless Production Assistant. Both him and others have continued to send me progress updates and approvals, which I am accessing via a satellite connection.

Anyway, the important bit is the game. Ivan is now working a great deal directly on the project, and has been picking up the slack for some of the areas I needed to address which has been a huge help. Those from the community who wanted to get involved in writing are keen to get started, but the response is so massive that we are looking to put a structure in place to ensure community written books pass through some kind of editorial process. This community content, together with copyright expired books, will form the basis of hundreds or thousands of books that can be found and read in the world. There are no set timeframes for this, so please be patient.

Programmer Roundup

Ondrej, our lead programmer, continues his work on moving DayZ into a server-client architecture, turing the entire architecture of DayZ into an MMO. Jirka is working on updating some of our steamworks integration, and fixing bugs associated with the massive inventory changes we implemented over the past month.

Radio Implementation

Bebul is working on our Radio implementation, allowing players to communicate using a basic radio, similar (but more simple) to the popular ACARS radio mod for ArmA2. Players pick up radios, and they can set a frequency and talk/receive text/voice from other players. The microphone or speaker can be turned on or off to allow players to use radios as a listening device. If the player has not crafted a headset onto the radio, then the output is public (either voice or text). The results are fantastic, and Bebul is now ensuring this all works properly in the all special cases during Multiplayer play.

Animators

Our team is working their way through the animation backlog, involving new zombie animations for the new skeleton, test melee moves for our new melee system, new animations for the new animals (such as the deer), and then onto player animations for the new skeleton, custom designed to feel more like a civilian rather than the trained soldier of ArmA2.

Internal Artists

Mostly they are working on creating the interior data required for the AI zombies to pathfind correctly inside buildings. New road decals have been created by Mario for the roads so it looks like they have a damaged look to them, to give the world more of a feel like “the Road”. One of our big special new buildings is in game, and we will surprise you with some new screenshots of this in the next devblog!

External Artists

Our team of artists recruited from the community have been hard at work. The new male character mesh is being prepared, in line with the new skeleton, as well as a new template for clothing skinning. The new M4A1 has been committed with proxies that allow our new attachment system to be utilized along with the crafting system. Also being worked on are a Gas Mask, Pilot Helmet, Mauser Rifle, pen/paper, mess tin, can opener - a huge amount of items are being developed while we wait for the programming tasks to be completed heading towards our first public release.

The excitement from the team is tremendous with all these fantastic new items, allowing huge crafting possibilities.

Map Design

Seven towns have been remade by SenChi, overseen by Ivan, to alter the look and feel better. Bugs are continually being fixed and we have purchased new satellite data to improve the detail of the base map (looks much better in the distance with this new data).

Conclusion

realize some people are upset at my departure from the project for two months to climb Mt Everest, but hopefully from this you can see the large team Bohemia have assembled behind the development that are continuing to innovate and develop DayZ Standalone in the direction of the game we all want. This is going to take as long as it needs to, we want to release our initial alpha under the architecture it needs to avoid hacking and security issues - this is the only remaining task stopping us from releasing the alpha. But while this task is being completed, we can continue with other activities.

The next devblog will feature some screenshots to demonstrate the progress, captured by Matt, but my satellite connection and tiny laptop cant cope with downloading the current build.

So, this is the devblog I write from Everest Base Camp, at 5400 meters! Tomorrow I am off to the Khumbu Icefall for training in fixed lines and ladders, big thanks to the community for their continued patience, and everyone at Bohemia who is pushing hard towards our DayZ standalone initial release!

Anyone who wants to follow my Everest exploits can do so either through my Tumblr (Rocketkiwi), Twitter (rocket2guns) or via the Adventure Consultants Dispatches.