How jnnshschl/ameisennavigation works
Main Components
• Navigation Server Module – This is found under “AmeisenNavigation.Server” and is responsible for receiving TCP requests, managing configurations, logging events, and orchestrating navigation tasks.
• Core Navigation Library – The “AmeisenNavigation” project folder provides the central pathfinding logic, including client definitions, helper functions, navigation sources (which support different MMAP formats), and smoothing algorithms (found under Smoothing, Utils, and NavSources directories).
• Data Exporter – “AmeisenNavigation.Exporter” contains code to extract and convert WoW navigation data (including modules like Mpq, Wow, and custom processors) into a format the navigation library can use.
• Asset Packager – “AmeisenNavigation.Pack” appears to be responsible for packaging or bundling assets (using components like miniz) needed by the navigation server.
• Tester/Client UI – “AmeisenNavigation.Tester” is a C# project utilizing XAML which likely provides a graphical test client or a debugging interface to interact with the navigation server.
• External Libraries – The project depends on several external libraries:
o recastnavigation (including Detour and Recast components) for mesh generation and pathfinding computations.
o AnTCP library (found in the “dep/AnTCP.Server” folder) to implement TCP-based communication.
o StormLib used (from the “dep/StormLib” folder) possibly in handling WoW-specific file formats.
Out Relationships and Interactions
• The Tester communicates with the Navigation Server through a TCP connection (facilitated by the AnTCP library) to initiate pathfinding requests and retrieve results.
• The Server uses configurations (from its Config folder), and logs (from its Logging module) before delegating tasks to the core navigation library.
• The Core Navigation Library is central; it interacts with:
o Various navigation sources provided under NavSources (both Anp and Mmap formats) to load and process world data.
o Smoothing algorithms (Bezier, Chaikin, Catmull-Rom) to smooth out raw path data.
o Helper utilities and client state management.
• The Exporter runs as a separate utility to ingest raw WoW data (possibly from Mpq reading and Wow-specific modules) and export it in a usable format.
• The Packager provides additional support to bundle these assets (maybe compress and prepare files) for server loading.
• The recastnavigation integration (with Detour and Recast components) supplies the underlying algorithms for mesh construction and spatial queries.
Architectural Patterns and Design Principles
• Layered/Modular Architecture: Separate projects for server, exporter, core navigation, and tester indicate a clear separation of concerns.
• Reusability & Extensibility: The distinct libraries (navigation processors, smoothing techniques, navigation sources) showcase the modular design that could be extended (e.g., integrating new MMAP formats or adding Flying Path Generation).
• Dependency Injection & Loose Coupling: Although not explicitly stated, the design hints that components such as configuration management, logging, and navigation computation are abstracted to support flexibility.
• Use of External Libraries: Third-party dependencies (AnTCP, recastnavigation, StormLib) provide critical functionality and suggest integrating these as clearly defined external services/modules.
Putting It All Together
– Display side components: the Exporter and Packager feeding processed navigation data into the core library.
– Show the integration of external libraries (AnTCP for TCP communication; recastnavigation with its Detour/Recast for mesh/path computations; StormLib for file operations) into the server or processing components.
– Ensure there is a clear flow between the modules and annotate any critical configuration or dependency injection flows.