How hary309/hry-core works
Main components of the system
• Plugin API and Core Interface – Core components (Core.cpp/hpp, Plugin.hpp, PluginInfo.hpp) that expose the framework’s functionality.
• UI & Rendering – Modules under “UI”, “Renderer” and ImGui integration (ImGuiImplEvents, UI pages). Indicate both renderer implementations: D3D11 and OpenGL.
• Configuration – Handling settings, with directories “include/Hry/Config” and “src/Config”, plus the fields mechanism (BoolField, NumericField, etc.) for plugin settings.
• Event System – Components under “include/Hry/Events” and “src/Events” (and nested Proxies for DInput8, Telemetry, WndProc, etc.) that facilitate event dispatching and handling.
• Input / KeyBinding – Code in “include/Hry/KeyBinding” and “src/KeyBinding”.
• Logger – Using “include/Hry/Logger” and “src/Logger” to capture logging functionality.
• Memory and Hooking – Components under “include/Hry/Memory” and “src/Memory”, plus the hooks in “src/Hooks”, to facilitate detouring and function hooking.
• SCSSDK Integration – Modules and channels in “include/Hry/SCSSDK” and “src/SCSSDK” for wrapping game telemetry channels (e.g., truck, trailer, job) and events.
• Modules – General plugin module management in “src/Modules” that handles dynamic or systematic extensions.
• Utilities – Supporting libraries under “include/Hry/Utils” and “src/Utils” for general helper functions, delegate patterns, task scheduling, hashing, etc.
Establish Relationships and Data Flow
• The Core/Plugin API serves as the central hub interfacing with all other systems.
• The UI layer consumes the rendering engine (which could be either DirectX 11 or OpenGL, depending on the chosen hook) and thus communicates with the lower-level Hooks.
• The Event system is tightly integrated with both the input handlers (like KeyBinding and system devices) and SCSSDK channels (telemetry data and gameplay events).
• The Config Manager collects settings via configuration fields, which are exposed to the UI for runtime changes.
• Logger sits as an independent component, accessible by most modules to record events or errors.
• Memory manipulation (Detour, Pattern Scanning, Hooks) is used to set up the necessary hooks in the game engine; these in turn feed data/events into the Event and UI systems.
• The Modules layer may depend on all of the above to enable or disable specific functionalities within a plugin.
Architectural Patterns and Design Principles
• Separation of Concerns: Each directory (e.g., Config, Events, Logger) reflects modular design. The API breaks the system into distinct layers.
• Plugin architecture: The framework is designed so that plugins can be developed on top of the core, enabled by the Module Manager.
• Event-driven design: With a robust event system (dispatchers and proxies), the software leverages callbacks and messaging mechanisms.
• Abstraction for rendering and haptic input: Supports different rendering backends and input handling mechanisms by abstracting implementation details.