How seconb/aimmy-arduino-edition works
Project Type & Purpose
• The project is a desktop application (written with C# using WPF/XAML) designed to automate aiming in games. It integrates Arduino support for mouse input, and the README warns about detection in specific games.
• It’s an “edition” of Aimmy that features additional Arduino/USB Host Shield integration, UI enhancements, and optimizations from an upstream fork (including DirectX screen capture, bezier curve manipulation, third-person support, etc).
File Structure
• The core solution “Aimmy2.sln” encompasses most of the application code under the “Aimmy2” folder.
– AILogic: Contains AIManager.cs for automated aiming decision logic.
– InputLogic: Handles mouse input through InputBindingManager.cs and MouseManager.cs.
– Class: Contains helper classes like Animator, UI, Theming, and others that perform core functionality.
– MouseMovementLibraries/ArduinoSupport: Contains ArduinoMouseInput.cs, clearly responsible for interfacing with the Arduino hardware.
– UILibrary and Visuality: These folders include multiple XAML views and their code-behind, forming the presentation layer.
– WinformsReplacement: Contains helper code for interacting with native Windows API calls.
• Outside the main application folder are deployment and hardware integration assets:
– “Arduino Setup” folder includes scripts (batch files) and firmware files (hex, config files, etc) used to flash the Arduino and set it up.
– “Universalv3_web_model” holds .bin files and a JSON model, possibly used for configuration or an external model resource.
– “configs” holds a configuration file, indicating external tuning parameters.
Key Components of the System (to include
a. Presentation Layer:
– UI Components (MainWindow, Welcome, various XAML files in UILibrary & Visuality).
– Display and configuration windows (e.g., ConfigSaver, DetectedPlayerWindow).
b. Business/Domain Logic:
– AILogic: Processes aiming decisions with AIManager.
– InputLogic: Manages mouse events/input for translating user actions into in-game movements.
– Other utility classes (Animator, PropertyChanger, SaveDictionary, etc.) that support the dynamic behaviors.
c. Hardware & Peripheral Integration:
– Arduino Support: Code in MouseMovementLibraries/ArduinoSupport and the separate Arduino Setup scripts that handle physical device interfacing.
– USB Host Shield support is indicated by both the Arduino-related code and the setup instructions.
d. Auxiliary/Utility Components:
– File management, configuration, updating, and external data handling (found in “Other” folder classes like UpdateManager, GithubManager, RequirementsManager, etc).
– WinformsReplacement: Provides native API calls and scaling support, bridging between legacy code and current UI paradigms.
– External Model Data: Files in Universalv3_web_model (might relate to AI or configuration models).
Relationships & Interactions
• The front end (UI) receives user input (config controls, status displays) and communicates with the business logic. For instance, changes in UI settings (e.g., bezier curve strengths) update the logic in AILogic or InputLogic.
• InputLogic processes mouse events and transfers commands to the AI and, when the Arduino mode is active, to the Arduino support module. This module then handles the communication with the actual Arduino hardware (flashed/set up via Arduino Setup).
• The Helper and utility classes (“Class” and “Other”) function as services that support these operations (e.g., configuration management, file handling, update checking).
• WinformsReplacement and the graphics folders (with fonts, etc.) support UI rendering and ensuring proper user experience.
Important Architectural Patterns and Technologies
• Modular Separation: Notice a clear separation between UI (presentation layer: UILibrary/Visuality), business logic (AILogic, InputLogic), and hardware integration (MouseMovementLibraries/ArduinoSupport plus the Arduino Setup components).
• MVVM-like Pattern: The use of XAML with code-behind hints at a Model-View-ViewModel (or at least a separation between UI and business logic).
• External Configuration and Updatability: The presence of configuration files and update managers indicates an architecture that favors external customization and dynamic updates.
• Hardware Interfacing: The project uses Arduino/USB Host Shield integration, denoting a layer dedicated to hardware communication.