How code-guy/bamboo works
Main High-Level Components
a. Editor Module
• UI Subsystem (ImGui via external/imgui)
• Editor Core (source/editor): asset UI, folder tree, property panels, simulation/PIE controls
b. Engine Core Module (source/engine)
• Core Systems: Logging (spdlog), Config (yaml-cpp), Event (eventpp), Math
• Platform Abstractions: File I/O, Timer, Thread-safe queues
• Reflection/Serialization (rttr + cereal)
c. Function Layers (within Engine)
• Framework (scene graph, entities, components)
• Physics System (Jolt Physics integration)
• Rendering System
• Render passes (deferred, forward, shadow, postprocess)
• Render Data & Pipeline (Vulkan RHI in source/engine/core/vulkan)
• Resource Management
• Asset Importers (tinygltf, ktx, custom)
• Shader Management
d. External Libraries
• Vulkan Memory Allocator (vma), GLFW, GLM, ImGui, spdlog, yaml-cpp, tinygltf, ktx, cereal, rttr, eventpp, random
e. GPU & OS Interfaces
• Vulkan Driver & GPU
• Windowing/Input (GLFW)
Relationships & Data Flows
• Editor ↔ Engine API: the Editor module calls into the Engine Core (entities, resource loader, simulation) via a well-defined API layer.
• Engine Core → Resource Manager: loading assets (meshes, textures, shaders), parsing config via yaml-cpp, serializing scenes via cereal/rttr.
• Engine Core → Physics System: updates, collision queries, body creation via Jolt.
• Vulkan RHI → OS & GPU: interacts with GLFW for window/surface, communicates with Vulkan driver.
• Event System: an internal bus (eventpp) delivering UI events, simulation events, and system events across modules.
• Logging & Config: global singletons accessed by all subsystems.
Architectural Patterns & Principles
• Modular layering: clear separation of Editor, Engine Core, Function Layers, and External Dependencies.
• Component-Entity System: scene graph uses entity/component pattern (source/engine/function/framework).
• Pipeline-based Rendering: sequence of render passes, configurable mix of deferred + forward.
• Data-driven design: YAML-based config, reflection via rttr for serialization and editor inspectors.
• Dependency isolation: engine/editor/game code compiled as static libs, minimal circular dependencies.
a. Three horizontal strata:
1. Editor Layer (top)
2. Engine Core Layer (middle) subdivided into subsystems: Core, Function, Resource, Physics, Render
3. External/Hardware Layer (bottom)
c. In Engine Core, arrange:
• Core Systems (Event, Logging, Config) at left
• Resource Manager centrally (AssetImporter, ShaderManager)
• Physics System (Jolt) at left-middle
• Rendering Pipeline (RenderPasses → VulkanRHI) at right-middle
• Framework (Entity/Component, WorldManager) between Core and Physics/Render
d. In External/Hardware layer, list:
• Disk/Filesystem (via FileSystem abstraction)
• Vulkan Driver & GPU
• Windowing/Input (GLFW)
e. Resource Manager downward to Disk (Load assets) and up to Framework. Connect Render Pipeline downward to Vulkan/GPU. Connect GLFW to both Editor (UI events) and VulkanRHI (surface).
Details
• Shader folder as a pipeline input → ShaderManager.
• Static libs linking: Engine Core compiles into libBambooEngine.a, Editor into libBambooEditor.a.
• Reflection/serialization round-trip between Engine Core and Editor for runtime data inspection.