How upcbasicengine/sobrassada_engine works
Project Type and Purpose
• This is a C++ game engine with a built‐in scene editor that supports game object and component creation, asset importing, and high-quality rendering.
• The README emphasizes that the engine provides an integrated scene editor, file operations, camera controls for 3D space, and menu-driven settings. This suggests that a clear separation exists between core engine operations and the editor/UI.
File Structure and Determine Major Subsystems
• Engine Core:
– Located in the “SobrassadaEngine” directory with Application.cpp/h as the engine’s entry point.
– Contains the main loop and integration points for various modules.
• Modules:
– The “Modules” folder includes individual engine components such as CameraModule, InputModule, SceneModule, EditorUIModule, WindowModule, etc.
– Each module encapsulates a distinct aspect (rendering, input handling, scene management, debugging, etc.).
• Scene & Resource Management:
– The “Scene” directory holds GameObject, Components, and Scene classes (including cameras, lights, meshes, etc.).
– The “ResourceManagement” folder handles resources like materials, meshes, models, textures, and prefabs.
• File System & Asset Pipeline:
– The “FileSystem” directory (with its Config subfolders and Importers) indicates management of asset import, metadata handling, and project configuration.
– The “Game/EngineDefaults” folder further provides default assets and shaders that the engine consumes.
• External Libraries (Libs):
– The “Libs” folder includes third-party libraries such as ImGui (for UI/editor), DirectXTex (image/texture processing), SDL (window, input, and system integration), MathGeoLib (mathematical routines for geometry), Optick (profiling), RecastDetour (navigation and pathfinding), and others.
• Utility Components:
– The “Utils” directory contains timers, delegates, logging, frustum calculations, and common helper classes.
• UI/Editor Components:
– The “UI” folder and the “EngineEditors” subdirectory provide the code for the editor’s node-based interface and texture library management.
Relationships and Interactions
– Illustrate the Module System as an independent block subdivided further into:
• InputModule (handles user inputs and camera control).
• CameraModule (controls view and transformations).
• SceneModule (manages game objects, components, and rendering of the scene).
• ShaderModule and OpenGLModule (handle the rendering pipeline).
• EditorUIModule (provides the scene editor and menu functionality).
– Show the File System/Asset Pipeline subsystem interacting with both the Resource Management (to load assets, metadata) and the Editor UI (for asset import and scene creation).
Architectural Patterns and Design Principles
– Modular design: Separate modules take care of specific concerns (input, rendering, scene, etc.).
– Data-driven asset management: The FileSystem with Importers and Meta data support indicates a decoupled resource management system.
– Integration of 3rd-party libraries: External brands are used to offload functionality like UI, texture handling, and mathematical operations.
– Hierarchical scene and component system: Organize game objects in the Scene folder with associated components, reflecting an entity-component-system (ECS) or a component-based design.
Specific Elements
– Optionally, outline the build/dependency structure (the “Licences” and “Game/EngineDefaults” directories can be noted as repositories of default assets and configurations).