Hello everyone,
I developed uMMORPG and uMOBA. Having pathfindingIterationsPerFrame is very useful to keep Unity from freezing up when too many players or monsters navigate around!
My question is, why not change it to pathfindingIterationsPerAgent? It seems to be smarter in every way.
Consider an MMORPG scenario where there are anything between 10 and 1000 players. There’s just no way to set a good pathfindingIterationsPerFrame amount to make sure that path calculation is always ‘reasonably fast’ but doesn’t take down the server.
The only solution right now is to constantly set: pathfindingIterationsPerFrame to EntityAmount * 100 or similar. This works in theory, but in practice no agent should be able to slow down other agents. If we have a huge game world where a player clicks to the end of the world, it would slow down path finding calculations for everyone else immediately.
If there was a pathfindingIterationsPerAgent setting then no agent would slow down any other agent. If a player clicks far away it takes slightly longer for that player only. Doesn’t that make more sense?
On a side note, are there any plans in regards to concurrency? Multithreaded pathfinding would provide gigantic benefits to all kinds of (online) games, especially MMORPGs. Right now, all of the user scripts run in one thread, which has a whole lot of simplicity benefits. UNET’s new Network Transport Layer recently introduced multithreading, which is really awesome because we can use one thread for all user scripts + N threads for networking. If Navigation would be concurrent, then that would greatly increase the possible amount of players per server.