cg小白兔 发表于 2024-10-12 15:16:31

【更新】Agents Navigation - Crowds 1.0.1扩展资源













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


该软件包是对现有代理导航系统的扩展,利用人群的流动/速度场提供替代路径解决方案。它是以 DOTS 为中心开发的。因此,它利用了 Unity 的最新技术栈,如 SIMD 数学、Jobs、Burst 编译器和 EntityComponentSystem。此外,它还支持混合模式,可在面向对象编程中与 GameObjects 配合使用。

该软件包的支柱
无缝集成 Unity: 与现有的 Unity 技术和谐集成,同时支持单点和点。
直观、精简的用户体验:提供简洁的用户体验,与 Unity 完美契合。
开箱即用的优化性能: 通过并行化和优化的代码确保默认的高性能。
清晰的代码架构: 坚持简洁的编码实践和清晰的架构。
采用多层 API,促进底层交互。
可扩展的模块化代码库: 在构建时考虑了可扩展性和模块性,只需对软件包进行最小的改动即可轻松扩展。

可以在非 ECS/Dots 代码中使用吗?
可以,有一个混合工作流,其中游戏对象与实体同步。这样就可以在面向对象编程中使用该程序包。当然,性能会稍差一些。

能否与 ECS 一起使用?
可以,本软件包使用 ECS。
此导航针对哪些游戏类型?
此软件包最适用于塔防、模拟战、动作游戏、动作游戏等。





页: [1]
查看完整版本: 【更新】Agents Navigation - Crowds 1.0.1扩展资源