Agents Navigation - Crowds

Updated
2024-09-20
Free
Tools
Version
1.0.1
File size
3.8 MB
Views
124
Registration required
Description

Extension package for Agents Navigation that adds support for crowds and other features.

 

This package is an extension of existing agent navigation systems that provide alternative pathing solutions using flow/velocity fields for crowds. It is developed with DOTS in mind. As a result, it takes advantage of Unity's latest technology stack, like SIMD mathematics, Jobs, Burst compiler and EntityComponentSystem. Additionally, there is hybrid mode support that enables using it with GameObjects in Object Oriented Programming.

 

Pillars of this package:

  • Seamless Unity Integration: Harmoniously integrates with existing Unity technology, supporting both mono and dots.
  • Intuitive and Streamlined UX: Offers a clean and simple user experience tailored for perfect alignment with Unity.
  • Optimized Performance Out of the Box: Ensures default high performance through parallelized and optimized code.
  • Clear Code Architecture: Adheres to clean coding practices with a clear architecture.
    Employs a multi-layered API, facilitating low-level interactions.
  • Scalable and Modular Codebase: Built with scalability and modularity in mind, allowing easy extension with minimal package changes.

 

Can I use this in non ECS/Dots code?

Yes, there is a hybrid workflow where Game Object are synced with Entities. This allow to use this package in Object Oriented Programming too. Of course, it should be expected that performance going to be slightly worse.

 

Can I use it with ECS?

Yes, this package uses ECS.

 

What game genres this navigation targets?

This package is best suited for tower defense, battle simulations, massive RTS, and any other game genre that favors huge crowds. It is rumoured that similar solution was used in Supreme Commander 2.

 

Can I extend functionality?

Yes, the package was designed in mind that it could be extended as every game has unique needs for AI navigation. This solution is very modular and allows trivial adding/removing of existing behaviors. However, to extend functionality efficiently, you will need to have knowledge of ECS.

 

Is it deterministic?

All systems are running in fixed update. In theory, it should be deterministic for Intel/AMD platforms (Burst). However, it still uses floats for navigation operations, which will not produce deterministic code across all the platforms.

 

How does this package differ from Agents Navigation?

This is an extension package of it and provides an alternative solution for pathfinding using flow fields. In addition, all the existing features from the base agent navigation seamlessly work with this package. It even allows mixing crowd agents with navmesh agents.

 

What is flow field and how does it compare vs typical navmesh pathfinding with avoidance?

The flow field is a grid-based graph, and a key difference is that the agent's steering velocity is calculated not per agent but per grid cell.

The key differences are as follows:

  1. Performance cost scales with grid size multiplied by group count instead of pure agent count. This allows for huge crowds with lower performance costs.
  2. Pathing and avoidance are combined, resulting in a greatly reduced likelihood of scenarios where agents get stuck due to local avoidance.
  3. Each agent group must share common destination goals, which means performance can quickly degrade if there are many groups.
  4. Agents exhibit much better flow in huge crowds, but at the same time, agents lose individuality and favor group flow instead of their own.

 

Technical details

  • Crowd flow
  • Scenarios - contains small isolated test scenes that showcases some common navigation behaviors (etc. circle, hallway, group ...)
  • Board Defense- small subset of towder defense game. With some common systems like building towers.

Comments
Comments is not yet
Add Comment
Please register
You may also like