Question about A* Pathfinding Project's Local Avoidance/RVO & WebGL Compatibility

Hi,

I’m developing a small Unity game targeting WebGL. The gameplay revolves around large-scale unit movement and combat, so I’m considering using the crowd-related features of the A* Pathfinding Project plugin.

However, I have a concern about WebGL compatibility. I learned that Unity’s ECS system (specifically the Job System) has significant limitations on WebGL because it’s single-threaded.

While reading the plugin’s documentation and code, it seemed to me that features like ​"Local Avoidance" and ​"RVO (Reciprocal Velocity Obstacles)​" might be built upon the ECS framework.

Therefore, my questions are:

  1. ​Can I reliably use these crowd features (Local Avoidance/RVO) to build my WebGL game?​*
  2. ​If so, are there any specific issues, limitations, or special considerations I should be aware of when using them on this platform?​*

Thanks in advance for your insights!

Hi

Functionally, it will work just fine. However, the primary concern is performance. WebGL does not support multithreading, as you mention, and since local avoidance is typically offloaded to multiple worker threads, you’ll not be able to achieve anywhere near as large crowd sizes as you’d be able to in a typical standalone game, as everything will need to run on the main thread. If I’d guess, I would say maybe a hundred or a few hundred agents could be doable, but I have honestly not done any WebGL development in a long time, so my estimate could be off.

2 Likes

thanks, then I’ll give it a try.
Hopefully I’ll be back with some performance statistics on webgl