How b1rtek/geode-gddlintegration works
Project Type & Purpose
• This project is a C++ mod that integrates with Geometry Dash Demon Ladder. It enhances the game by displaying demon level ratings, skillset statistics, detailed level information, and offers direct in-game rating submission through various custom UI popups.
• The README emphasizes features such as advanced level info popups, demon split pages, integrated search features, and configurable UI settings. The purpose is to blend external GDDL functionality into the game experience.
Analyzing the File Structure
• Top-Level Files: You have typical build and configuration files (CMakeLists.txt, mod.json, LICENSE) along with GitHub CI configuration in the .github directory.
• Source (src): Contains the main application entry (main.cpp) and several subdirectories that reflect clear modularization:
• layers/: Contains UI layer classes for popups and various UI components (e.g., GDDLLoginLayer, GDDLSearchLayer) that handle user interactions.
• modified/: Holds modified versions or overrides of existing game layers (e.g., LevelBrowserLayer, LevelSearchLayer) suggesting a patching/modification architecture.
• objects/: Encapsulates data entities (e.g., GDDLRating, RatingsSpread, Skillsets) used by the mod to store and manage rating/submission information.
• settings/: Manages UI configuration and mod settings (e.g., positioning settings, exclusion ranges) allowing adjustability of integrated UI elements.
• Other support files: RatingsManager.cpp/h and Utils.cpp/h provide core functionalities, such as managing ratings retrieval and utility functions/application logic.
Main Components
• Core Mod Application:
• Main Entry (main.cpp) – The starting point that initializes the mod.
• RatingsManager & Utils – Handle business logic for fetching, processing, and distributing rating data.
• UI Layers:
• Primary Pop-up Layers (GDDLLoginLayer, GDDLLevelInfoPopup, GDDLAdvancedLevelInfoPopup, etc.) – Manage interactions, logins, and rating submission interfaces.
• Modified Layers – Patching or augmenting existing game UI elements (e.g., LevelBrowserLayer, LevelSearchLayer) to integrate GDDL features.
• Data & Object Models:
• Objects (GDDLRating, RatingsSpread, Skillsets, Submission) – Represent complex data used for displaying ratings and statistics.
• Nodes (BarChartNode) – Custom UI components for data visualization.
• Settings Module:
• Contains nodes and classes for user-configurable settings regarding button positions, cache reset, login configurations and more.
• External Resources:
• Resources Folder – Includes assets (e.g., images like gddlpopup.png, search.png) for enhanced UI presentation.
• CI/CD & Build Pipeline:
• GitHub workflows and CMakeLists.txt indicate the build and deployment steps, though they are less central to runtime architecture.
Relationships & Interactions
• The main module invokes initialization routines (via main.cpp) and sets up the RatingsManager, which then orchestrates data collection from the GDDL API.
• UI Layers (both in layers/ and modified/) handle user interaction; for example, the GDDLLoginLayer facilitates user authentication while GDDLRatingSubmissionLayer sends user ratings.
• Data objects are populated and passed between layers and the RatingsManager to update UI displays (charts, level info popups).
• The Settings module influences the UI layout (e.g., through ButtonPositionSettingNodeV3) ensuring that the mod’s UI elements adapt to other mods or user preferences.
• Utilities in Utils.cpp/h provide common helper functions across these components.
Key Architectural Patterns & Principles
• Modular Design: Different folders (layers, nodes, objects, settings) clearly separate concerns.
• UI-Logic Separation: The UI layers are distinctly separated from core logic classes like RatingsManager and data objects.
• Extensibility: The existence of a “modified” directory suggests an override or extension pattern to enhance existing game functionalities without rewriting everything.