HomeGamesUpdatesPricingMethodology
Steam News18 May 20261mo ago

NPC Pathfinding

As we all know, devs love commenting code. It’s why most programmers get into the industry in the first place.

Full notes

Full POSTAL 2 VR update

Read the full published notes in a cleaner layout. The original post stays linked below.

What changed

0 fixes2 additions10 changes2 removals
  • Gameplay
  • Balance
  • Server
  • Maps
addedDev Diary Part 2 - NPC States & Behavior (Coming Soon…)The different states NPCs can exist in (idle, wandering, thinking, attacking, fleeing, etc.), how they transition between those states, how we’re adjusting and expanding the underlying state system to improve overall behavior, and how those states react to new VR-specific player movements and interactions.
changedPart 3 - NPC Damage (Coming Soon…)How damage is visually represented. How it affects the character outside of states, rag-dolling and physics, dismemberment and more! This update will present a virtual POSTAL torture chamber. You’ve been warned!
changedDev Diary Part 1 - Pathfinding Steam post imageThis approach comes with some visible trade-offs . Movement can look a little… mechanical . Because characters are always traveling between discrete points, NPCs follow segmented lines rather than flowing curves. When chasing the player, this often manifests as a distinctive zig-zag pattern , when a “ as the crow flies ” straight line, whilst naturally avoiding any obstacles, would be more realistic .
changedDev Diary Part 1 - Pathfinding Steam post imageEach node isn’t just a position, it’s a potential point of meaning . Nodes can represent doors, ladders, interest points, scripted interaction zones, behavioral triggers, queuing spots and a lot more. In other words, gameplay logic is deeply intertwined with navigation itself. The nodes are merely something NPCs to and from; it actively informs the state system. In many modern engines, this kind of contextual awareness is often layered on top of navigation using colliders, triggers, or separate systems that sit alongside a navmesh.
changedDev Diary Part 1 - Pathfinding Steam post imageThe smoother, more natural movement you get from navmesh-style traversal.
changedDev Diary Part 1 - Pathfinding Steam post imageWhile preserving the rich, gameplay-driven intent of the original node network.

As we all know, devs love commenting code. It’s why most programmers get into the industry in the first place. Our work would be a lot easier if it weren’t for the pesky code that often sits between these beautiful pearls of wisdom. Here are some of the completely real, super useful and informative comments peppered in the POSTAL 2 Redux code: //They say every cloud has a silver lining. In a similar way every actor has a position in the World. If it doesn't we really need to question what we know about Actors… and possibly clouds.

// Further Check Native Types of whatever the hell they are called, probably meaningless, as is this comment

//For the love of all that's good and holy, please just stop puking... Tells the head to stop the puking.

//If not then go into an extended, idiotic conversation in which one guy asks something, the other guy says something stupid, and the first guy is confused. Loop appropriately. //Otherwise, stare at the weirdo

When we collect enough of these comments together, we tie them in a neat bow and that becomes a dev diary (cue angelic music).

We’ll aim to give these some structure, vastly increasing the amount of people that read all the way until the end. If we get to the double digits, we’ll be close to a World Record for the amount of people who finishing reading a dev diary. We’ll be releasing these throughout development. The first Dev Diary series will focus on what, from our point of view, is the most important part of POSTAL 2 Redux:

The Beautiful and Chaotic Residents of Paradise!

AKA Non-Player Characters (NPCs)

In 1986 computer science pioneer Craig Reynolds performed a ground-breaking test where instead of coding exact behaviors he instead just gave digital birds a set of simple rules and set them loose. It became famous due to what transpired. When these bird agents were combined they started mimicking real World behaviors like flocking, V-formations and turning patterns. This proved that even in a simulation lifelike collective intelligence can emerge from agents following only three simple local rules, without any central control or explicit knowledge of group behavior. Basically Emergent Behavior. Well…. he might as well have not bloody bothered because a few years later the NPCs in POSTAL 2 creates a chaotic emergent cacophony of pee, bullets, donuts and puking and not a bird in sight.

Bird Related POSTAL Trivia: In early tests of the pigeon mission there were plans to have 25,000 pigeons on screen at once. However, we discovered anything over 10,000 and it appears the automated agents in their small bird brains lead to pigeons grouping together and forming their own culture and ultimately employment unions leading to a dreaded bird strike. We therefore had to reduce the number to prevent dissent. Disclaimer: All bird related trivia and related information is completely nonfactual and is at best: a waste of everyone’s time.

If POSTAL 2 was a body, the whole thing would be held together by the beautiful sinews and strands of the fleshy tissue that is the NPCs. Close your eyes and think of your favourite moments in POSTAL 2. Stop chasing that poor woman pissing as you go, open your eyes and keep reading. I wager all my valuable NFTs that your favorite moments almost all involve interacting with an NPC or NPCs interacting with each other.

Guys…. are you still with me? What I’m saying here is that if we don’t recreate this ingenuity, Redux will not be a success. So let’s cover in these updates how we intend to do that so if nothing else, I can stop talking about birds.

Below is a brief outline of topics we aim to cover during these dev diaries we'll post throughout development.

Dev Diary Part 1 - Pathfinding

How NPCs understand the world, plan their routes, avoid obstacles, and move beyond the original node-based system that had a habit of producing some truly committed zig-zagging.

Dev Diary Part 2 - NPC States & Behavior (Coming Soon…)

The different states NPCs can exist in (idle, wandering, thinking, attacking, fleeing, etc.), how they transition between those states, how we’re adjusting and expanding the underlying state system to improve overall behavior, and how those states react to new VR-specific player movements and interactions.

Part 3 - NPC Damage (Coming Soon…)

How damage is visually represented. How it affects the character outside of states, rag-dolling and physics, dismemberment and more! This update will present a virtual POSTAL torture chamber. You’ve been warned!

Part 4 - Level Streaming & NPCs (Coming Soon…)

In this section we’ll take a holistic look at how level streaming is being achieved and how NPCs wandering off where they don’t (or do now) belong fits into this.

Part 5 - Persistence & NPC (Coming Soon…)

In this final section we’ll take a look generally at what information about the World and NPCs is retained and then further maintained into save files. We’ll talk about what NPCs will remember from one day to the next and how your actions in the World are presented from day to day.

Dev Diary Part 1 - Pathfinding Steam post image

In the original POSTAL 2, pathfinding was built almost solely on a node-based system. As you can see in the images above and below, levels are covered with hundreds of manually placed navigation points represented by apples, and NPCs move from node to node (based on state logic covered in Part 2) like hungry Nokia snakes. Unreal Engine 1.5 ish, the engine used for the game, builds a larger connected graph from these points, assigning costs, preferred routes, forced paths and special traversal rules. Steam post image

This approach comes with some visible trade-offs. Movement can look a little… mechanical. Because characters are always traveling between discrete points, NPCs follow segmented lines rather than flowing curves. When chasing the player, this often manifests as a distinctive zig-zag pattern, when a “ as the crow flies ” straight line, whilst naturally avoiding any obstacles, would be more realistic.

However, the upside is also clear.

Each node isn’t just a position, it’s a potential point of meaning. Nodes can represent doors, ladders, interest points, scripted interaction zones, behavioral triggers, queuing spots and a lot more. In other words, gameplay logic is deeply intertwined with navigation itself. The nodes are merely something NPCs to and from; it actively informs the state system. In many modern engines, this kind of contextual awareness is often layered on top of navigation using colliders, triggers, or separate systems that sit alongside a navmesh.

For POSTAL 2 Redux, our goal is to aim for the best of both worlds:

  • The smoother, more natural movement you get from navmesh-style traversal.

  • While preserving the rich, gameplay-driven intent of the original node network.

It’s worth noting that completely removing the node-based foundation wouldn’t be a simple upgrade, it would be closer to remaking levels and systems from scratch, with massive knock-on effects across AI behavior, scripting, level design and moment-to-moment gameplay. In other words, it would lose too much of what makes POSTAL 2, POSTAL 2. Steam post image

Rather than discarding the node system, we treat it as a high-level layer of semantic information, while allowing lower-level movement to be continuous and fluid.

It was also important to understand that a lot of the natural interaction between NPCs happened because they were on these set paths, so it was easier to guarantee meetings and have a two-way interaction of something like a conversation or simply stepping around each other in a predictable way. We must be careful to not lose that, recognizing even navigation paths themselves are important.

So, without getting into pseudo / actual code territory, a good way to think about it is this:

The node-based system is still responsible for inferring intent, where an NPC generally wants to go and why. But the moment-to-moment movement needed to get there is now handled at a lower level in a navmesh in a much more flexible and realistic way.

Small aside: Navmesh-based movement on its own isn’t some perfect silver bullet either. A common side-effect is “conga-lining” where NPCs naturally gravitate toward the mathematically optimal inside edge of a corridor or corner, resulting in long, single-file lines of characters all tracing the exact same path. It’s the lowest energy cost, but not especially believable or visually pleasing. Because we are maintaining the underlying nodes we can easily specify and intentionally introduce variation at specific areas of the level (corners, choke points, junctions, or wider spaces) so NPCs understand that these are places where they should spread out, offset slightly, or choose subtly different micro-paths.

One of the biggest wins from this hybrid approach is that NPCs are no longer required to physically “live” on the nodes themselves.

That untangling opens the door to entirely new kinds of behavior. Steam post image

In the original game, NPC reactions often snapped fairly quickly into broad buckets:

  • Confront the player

  • Flee from the player

  • Sidestep and continue their route

Those states worked, but they were necessarily coarse.

Now we can introduce intermediate stages. For example, an NPC might enter a short appraisal phase, keeping the POSTAL Dude in view, subtly repositioning, maybe circling or strafing a little before committing to confrontation, avoidance, or disengagement. The character is already “thinking,” and their movement starts to reflect that thought process.

As we push further into combat behaviors, this same foundation naturally extends into things like:

  • Better flanking

  • Smarter spacing between NPCs

  • More believable crowd reactions

  • Clearer intent in hostile vs cautious movement

We’ll dive into those “thought” topics properly when we get to the NPC states and behavior dev diary.

For now, this gives a glimpse into our overall philosophy: Redux isn’t simply about putting a shiny wrapper around the original and being happy with some higher fidelity graphics. It’s also about carefully modernizing the underlying systems in ways that improve the experience, while preserving the logic, personality, and emergent chaos that made POSTAL 2 what it is in the first place.

Baggy (Team Beef)

Source

Steam News / 18 May 2026

Open original post

Changelog.gg summarizes and formats this update. How we read updates.