How eqmg/acid works
Project type and purpose
• Acid is a cross-platform, modular C++17 game engine. It provides a rendering pipeline (Vulkan + MoltenVK), physics (Bullet3), audio (OpenAL), networking, resource management, entity-component system, and a suite of subsystems (shaders, post-processing, UI, particles, animations, file I/O, etc.).
File-structure highlights
• Top level:
• CMake & configuration files for build generation on all platforms.
• External/ : bundled third-party libraries (GLFW, FreeType, stb, FastNoise, Bullet3, glslang, etc.).
• Sources/ : core engine code organized by subsystem (Animations, Audio, Bitmaps, Graphics, Guis, Inputs, Maths, Meshes, Models, Network, Physics, Post, Resources, Scenes, Shaders, Skyboxes, etc.).
• Resources/ : art assets (models, textures, shaders, fonts, sounds).
• Tests/ : multiple sample/test applications and unit tests demonstrating and verifying engine subsystems.
Architectural insights from README
• Engine is highly modular: each major feature is its own C++ namespace/folder.
• Uses an Entity-Component System (Sources/Scenes).
• Central rendering loop manages subrenders (GuisSubrender, MeshesSubrender, Post-processing, ShadowsSubrender, etc.).
• Resource loading and serialization (JSON, XML) feed subsystems with assets.
• Subsystems communicate through event callbacks, thread-safe command buffers, and shared resources.
• Application / Engine Core – the entry point, main loop, module manager.
• Scene & Entity-Component System – manages entities, components, prefabs, systems.
• Resource Manager – file search, asset serialization (JSON, XML), caching.
• Graphics Subsystem – Vulkan instance & devices, swapchain, renderpasses, pipelines.
• Shader Compiler / Reflection – on-the-fly GLSL→SPIR-V.
• Rendering Pipeline – subrenders (Deferred, Gizmos, Guis, Particles, Shadows, Post).
• Physics Subsystem – Bullet3 integration (colliders, rigidbodies, forces).
• Audio Subsystem – OpenAL backend, sound buffers (flac, mp3, ogg, opus, wave).
• Input Subsystem – keyboard, mouse, joystick, input schemes, axes/buttons.
• UI Subsystem – constraints, layout, MSDF font rendering, drivers.
• Network Subsystem – HTTP, FTP, TCP, UDP.
• Utility Modules – Maths, Timers, Logging, ThreadPool, Events/Delegates.
• External Dependencies – Vulkan SDK, MoltenVK, OpenAL SDK, Python (build scripts).
b. Relationships and data flows
• Application Core invokes Resource Manager to load assets → assets feed Graphics, Audio, Models, etc.
• Input Subsystem generates events → Scene or UI Systems consume to modify entities.
• Physics Subsystem updates collision & transform data → Scene updates entity components.
• Audio Subsystem plays sound buffers loaded by Resource Manager, triggered by game logic or physics.
• Network Subsystem requests/responses drive game state or asset downloads.
• Subrender stages communicate: Shadows → Deferred pass → Post-processing → GUI/UI.
c. Architectural patterns
• Modular singletons (e.g., Window::Get(), Timers::Get()).
• Entity-Component System for decoupling data & behavior.
• Command buffers + thread safety for multi-threaded rendering.
• Event/Delegate pattern for loosely-coupled callbacks.
• Layered rendering (deferred, compositing, post filters).
• Plugin-like External/ folder for third-party code.
d. Call out key technologies
• Vulkan + MoltenVK for cross-platform GPU API.
• Bullet3 for physics.
• OpenAL-Soft for audio.
• glslang for shader compilation.
• CMake for build & dependency management.
• JSON/XML (via custom Files/Json, Files/Xml) for serialization.