How ao-libre/ao-cliente works
Main Components
• Game Client Core – This is the heart of the application. It includes the “CODIGO” folder with subdirectories such as:
• Aplicacion: general game logic (e.g., Application.bas, ProtocolCmdParse.bas, etc.).
• Motor: contains the game engine modules that handle rendering, particles, lighting, drawing, and utilities (e.g., clsBatch, clsTextureManager, mDx8_Engine.bas).
• Red: the networking layer with protocols, TCP, socket management, and communication functions.
• IO: handles file input/output (JSON parsing, INI management, byte buffering).
• User Interface Layer – Located in “CODIGO/Formularios” and “CODIGO/Dialogos” as well as in “uControls”. This layer manages all forms (VB forms and FRX files) that comprise the client’s GUI (menus, chat windows, character creation, settings, etc.).
• Asset Management – Several top-level folders (AUDIO, Graficos, Mapas, Lenguajes, INIT) contain resources:
• AUDIO holds various audio assets (MIDI, MP3, WAV).
• Graficos includes assets for buttons, interfaces, skins, and maps for UI elements.
• Mapas has the definition files for game maps.
• INIT and Lenguajes supply configuration data, language strings, and initialization parameters (e.g., Config.ini, messages.txt, etc.).
• Update and Integration Components – As described in the README:
• The autoupdate mechanism compares the current version (from INIT/Config.ini) with the latest release from Github. That process then launches the external updater executable (ao-autoupdate). There’s also linkage to online logs and version checking.
• External/Supporting Tools – Additional utilities like AdminLibSetup.exe, GenerarFK.exe, and some scripts for git or encoding fixes.
Relationships and Interactions
• The Core Engine is further divided into modules: the Game Engine (Motor), the Networking layer (Red), and the IO functions.
• Assets (Audio, Graphics, Maps, etc.) interface with the engine and forms for rendering and gameplay feedback.
• The update mechanism interacts with the core on startup to check for version discrepancies and launch the updater.
• From UI to Core Engine, and from Core Engine to assets.
• From Networking module to external servers.
• From the autoupdate component back to the core application.
Architectural Patterns and Design Principles
• Separation of concerns: while the code is spread over many modules, each folder (e.g., Motor for rendering, Red for communication) has a distinct responsibility.
• Use of external configuration and version files (e.g., INIT/Config.ini) for update control.
• The update engine shows a pattern for self-updating architecture based on external endpoints (GitHub releases).
Detail Level
• The key is to be very explicit about the relationships – splitting the monolithic VB6 code into logical subsystems.
Happy diagramming!