Video summary

RTS Pathfinding Explained (and Why It Feels So Good When It Works)

Main summary

Key takeaways

Gaming

Storyline

  • No game storyline is directly discussed.
  • The video focuses on the RTS feel of crowd simulation and pathfinding, not narrative plot.

Core topic: Pathfinding vs. Crowd Simulation (what “feels good”)

Pathfinding (RTS meaning)

  • Primarily routes around static obstacles (terrain/buildings) using:
    • nav meshes
    • path queries

Why pathfinding doesn’t cover unit-vs-unit navigation

  • In RTS, units generally don’t path around other units.
  • Updating nav meshes for moving units is too expensive, especially with:
    • higher unit speeds
    • larger unit counts

Crowd simulation (the missing piece)

  • Crowd simulation handles local avoidance using limited nearby information—often framed as something like:
    • “the 3 ft in front of you” concept
  • Good crowd behavior prevents:
    • frustrating jams and deadlocks
    • walling/clumping
    • “give up” cases where units stop trying to reach goals

Gameplay / behavioral highlights (examples from RTS games)

StarCraft II–style behavior (described as strong)

  • Units dynamically reposition to reduce interference.
    • Example: lower-range units avoid pushing into higher-range units.
  • Units can “go around” enemies rather than only reacting in place.
  • Caveat: SC2 still has edge cases where units become blocked and abandon attacking because they can’t find/“see” alternate routing.

Age of Empires 4–style approach (described as different)

  • Uses a pushing mechanic upon entering attack range.
  • Side effect: front units can become too close.
    • Example mentioned: archers pushed near catapults leading to full impact.
  • Mitigation:
    • Formations / pre-sorting arrange units by role (e.g., knights up front, archers behind).
    • This reduces problematic pushing and lessens reliance on complex avoidance.

Key issues / edge cases discussed

  • Units stuck behind “invisible non-navmesh blockers”
    • Concept example: marines may behave as if routing is impossible because local crowd logic limits what they can infer.
  • Units “block” each other

    • These blockers may not behave like true static obstacles for navmesh logic.
  • Traffic jams at formations and choke points

    • Straight walls or concave arrangements can cause groups to “second guess” movement due to limited local awareness.
    • At choke points with multiple routes, units may overuse a single lane until they believe they’re stuck.
    • The video claims a significant portion can give up.
  • Unwanted movement of units meant to stay put

    • Units placed for defense/positioning can be displaced by passing units.
    • Example: hydra/movers causing an ultralisk-area unit to drift away from its intended spot.
  • Small-unit vs. big-unit clumping

    • Without strong avoidance, small units can get caught against large units.
    • This is especially likely if large units form a wall.
  • RVO avoidance limitations (reciprocal velocity obstacle)

    • RVO may work for small numbers.
    • At massive unit counts it breaks down:
      • units can be left behind
      • units may fail to reach destinations

Strategies / techniques mentioned to improve crowd simulation (including Zerospace)

Collision tiers (Zerospace)

  • Prevent larger units from being displaced by smaller units around them.

RVO-style avoidance (not sufficient alone at scale)

  • Redirects velocities as units approach each other.
  • But performance/behavior degrades with large crowds.

Vehicles / acceleration-based units

  • Using acceleration changes motion behavior and enables different tactical outcomes.
    • Example: hover tanks.

Precision and control features

  • Units move toward the center of the mouse click location.
  • “Magic box implementation” to preserve intent when clumps are small enough.
  • “One pixel away” adjustments for cases where targets require that precision.

Formations (planned / used)

  • Reduce clumping using role-based grouping behaviors.
  • Intended to create controllable large-scale visual patterns (e.g., “Roman legion look”).

Performance / tick-rate considerations (why it’s hard)

  • Crowd simulation is expensive:
    • computational cost rises sharply with more units
  • “Limited vision” behavior is partly a performance necessity.

Mentioned performance examples / targets

  • StarCraft II
    • Drops below 30 FPS around ~1,000 marines attacking
    • Tick rate ~23 per second mentioned
  • Zerospace
    • Handles ~500 units at ~80 tick rate on a described 2.4 GHz machine
    • Tick rate may be lowered later (40–60 mentioned)

Optimization tactics mentioned (H4-style context)

  • Lower crowd-sim tick frequency:
    • rotations/direction changes happen less often
    • transitions remain smoother
  • Use one CPU for the crowd sim step to reduce hardware requirements.

What better crowd simulation unlocks (game design impact)

  • More RTS spectacle:
    • more units swarming and “smashing” feels better
  • Especially benefits PvE modes:
    • campaigns
    • co-op scenarios
  • Zerospace survival-mode example
    • Similar vibe to They Are Billions waves, but co-op
    • Improved crowd sim would allow thousands of units in wave nights.

Sources / games mentioned

  • Marv (from Zerospace / Zerpac(e))
  • StarCraft / StarCraft 2
  • Age of Empires 4
  • Warcraft 3
  • They Are Billions
  • Zerospace / Zerpac (featured game discussed)

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video