Skip to content

PathFindService & RoamingState.Mode - #67

Merged
aqpanaciy merged 2 commits into
developfrom
aqpanaciy-pfs
Sep 27, 2026
Merged

aqpanaciy merged 2 commits into
developfrom
aqpanaciy-pfs

Conversation

@aqpanaciy

Copy link
Copy Markdown
Collaborator
  • added the ability to enable NPC roaming only when players are present;
  • introduce a background pathfinding subsystem and integrate it with zones.

aqpanaciy and others added 2 commits September 23, 2026 12:26
- added the ability to enable NPC roaming only when players are present. This is enabled by the admin command/configuration value.
Introduce a background pathfinding subsystem and integrate it with zones.

- Added IPathFindService, IPathFindInfo, PathFindInfo/HomePathFindInfo and PathFindService (channel-based queue, multiple worker tasks, logging and stats).
- Added AStarFinderReusable: optimized, reusable A* implementation with stamp-based(by @claude) closed list and debug validations.
- Register PathFindService in ZonesModule and inject into Zone; IZone and Zone expose IPathFindService.
- HomingAI updated to enqueue HomePathFindInfo instead of calling A* directly.
- GlobalConfiguration.ConcurrentPathFinds added to control worker count (defaults to CPU-based heuristic).

Note: API changes to IZone/Zone and DI registration may require recompilation of dependents.
Co-Authored-By: Copilot <198982749+Copilot@users.noreply.github.com>
Co-Authored-By: Claude <claude@users.noreply.github.com>
@Sellafield

Copy link
Copy Markdown
Contributor

What are proposed defaults for this?

@aqpanaciy

Copy link
Copy Markdown
Collaborator Author

This reduces the server's RAM usage during pathfinding. If the production server doesn't have issues with this, then there is no need for this PR.

@aqpanaciy
aqpanaciy merged commit 9f0df6f into develop Sep 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants