Image RSS Feed Latest Screens
Dayz - August Dayz - August Dayz - August
Blog RSS Feed Report abuse Latest News: The challenge and saga of Zombie Pathfinding

6 comments by TheUnbeholden on Aug 20th, 2014

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.

Media RSS Feed Latest Video
Downloads RSS Feed Latest Downloads
The Six Updater

The Six Updater

Aug 1, 2012 Full Version 14 comments

This is the easiest way to install Day Z You can all thank me later...

DayZ 1.7 Test Release

DayZ 1.7 Test Release

May 30, 2012 Patch 18 comments

You do not need the ArmA2 beta patch to join (but it is recommended).

DayZ v1.6.0.1

DayZ v1.6.0.1

May 30, 2012 Full Version 31 comments

The lastest version of Day Z for Arma 2 Combined Operations.

Post comment Comments  (170 - 180 of 238)
noob-killer
noob-killer Jun 21 2012, 12:58pm says:

Dear developer, your last patch really good but a bit is too hardcore.... As I said zombies can spot you now way easier and you spawn with no weapons. And crouching zombies are now pain in the ***.

Would you please at least make zombies walk if one will shot them right in their feet or knees? So that they will not be able to run anymore.

Thank you.

+5 votes     reply to comment
Shrapnel_Empire
Shrapnel_Empire Jun 22 2012, 12:09pm replied:

zombies are using ultra-sensitive x-ray views and headphones, and yet they drink energy, despite the fact that they all rotted.

+6 votes     reply to comment
noob-killer
noob-killer Jun 19 2012, 10:01pm says:

1.7.1.4 patch is good though, but my opinion is that zombies eye sight must be aggravated.
And, what is the point of putting zombies in barns and other buildings? They just stand still right at loot places. It just makes player must kill zombies in buildings and expose himself to other players and zombies around.

1 zombie in building is ok but 2-5 is really insane.

+1 vote     reply to comment
noob-killer
noob-killer Jun 19 2012, 3:11pm says:

Hello,
Dear developer. we are so disappointed by new patch - 1.7.1.2

IT became just really impossible to play.

1. You said that zombies will not spawn in buildings now. But they already didn't spawn there, at least I haven't ever seen it. But now they spawn in buildings and stack in concrete or walls.

2. I really glad that you have removed the bug when zombies can see you from behind and through a wall. But now they can see you even from 30-50 meters range! No mater you do they will catch you now. The only solution is to prone but what sense in going prone all game long? Even prone now gives 1 unit of visibility, before it was 0. Zombies can spot a player really way more easier now.

3. Servers crush every 30 minutes. I guess it caused by hatchets and crowbars. Because I noticed that every time I pick up a crowbar server shuts down.

4. Some kind of bug appeared when people can't chat, your chat is just not visible for anyone. (or maybe it is in server settings...)

5. Crouching zombies became way more hardcore but thanks for new animation. It is really now more difficult to get rid of them.... they just go non-stop! they don't give you any chance to aim as regular zombies do. Would you please give them a moment to stop every 3-5 seconds.

Hope you will fix it soon, because for even me - the guy who has mp5sd it is difficult to play, just imagine how difficult it would be for player with PM or weapon with no silencer!

+4 votes     reply to comment
Shrapnel_Empire
Shrapnel_Empire Jun 18 2012, 8:44am says:

return the old starter kit and the old zombies!

+2 votes     reply to comment
gage3197
gage3197 Jun 17 2012, 11:29am says:

I'm getting a no Weapons.cfg error, and its making my game lag like heck. Does anyone know how to fix this?

+3 votes     reply to comment
Shrapnel_Empire
Shrapnel_Empire Jun 17 2012, 8:54am says:

you've overdone it with the hardcore!

+2 votes     reply to comment
Shrapnel_Empire
Shrapnel_Empire Jun 17 2012, 8:52am says:

return the pm!

+3 votes     reply to comment
Victor334x4
Victor334x4 Jun 17 2012, 2:14am says:

This is going to be so fun...

0 votes     reply to comment
VigoVonHomburg
VigoVonHomburg Jun 16 2012, 6:47pm says:

Anyone wanna play this with me; Steamcommunity.com
Add me.

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
ARMA 2: Combined Operations Icon
Platform
Windows
Contact
Send Message
Official Page
Dayzmod.com
Release Date
Released Jan 21, 2012
Mod Watch
Track this mod
Share
Community Rating

Average

8.9

457 votes submitted.

You Say

-

Ratings closed.

Highest Rated (7 agree) 8/10

Giving this mod a score when it's in an alpha phase is sort of silly but I'll throw in my two cents What makes this game great is the fact that it really ain't a game, there are no real gimmicks or 'special' game mechanics; it's just you and the rest of the world on a 225 sqr KM map, having to outwit and defend yourself against the elements of nature (gotta find food and water, and stay warm), the undead (they're around the entire country and they're pretty scary to fight in a big horde), and even…

May 31 2012, 12:15am by Smiley_Riley

Lowest Rated (12 agree) 1/10

Very overrated and overhyped for being a mod similar to many others. I find other zombie mods to be much better than this one, considering this is a game of run as far as you can and see what kills you. 1/10 from me.

Aug 4 2012, 6:13pm by Seth1466

Style
Genre
First Person Shooter
Theme
Horror
Players
Multiplayer
Twitter

Latest tweets from

It can take up to a few hours for tweets to begin appearing.

Embed Buttons

Promote DayZ on your homepage or blog by selecting a button and using the embed code provided (more).

DayZ DayZ
DayZ
Statistics
Rank
450 of 22,808
Last Update
4 months ago
Watchers
928 members
Files
3
News
6
Features
5
Reviews
99