How 007havegone/ferraris works
Project Type and Purpose
• The README clearly states that Ferraris is a “personal primer Game Engine,” which means it is focused on delivering essential engine mechanics for game development.
• The project includes tools for graphics rendering, content management, and a dedicated editor, indicating both a runtime engine and development environment.
File Structure for Architectural Clues
• Top-Level Components:
• “Engine”: Contains the core game engine components including main entry points, core modules, systems for graphics (using Direct3D12), platform abstraction, and utilities.
• “EngineDLL”: Provides DLL wrappers for engine APIs, enabling modular integration or runtime linking.
• “ContentTools”: Likely a set of utilities for editing or managing game content (e.g., geometry and mesh primitives).
• “EngineTest”: Contains test code to validate functionality of engine components like shader compilation, rendering, etc.
• “FerrarisEditor”: A C# (WPF-based) project that acts as a game editor with various subcomponents (editors for geometry, world, assets, etc.), including project templates and a DLL wrapper to interact with the engine.
• Notable Subdirectories and Files:
• Under “Engine/Graphics/Direct3D12”: Detailed source files that clearly encapsulate Direct3D12 rendering specifics (e.g., interface, resources, shaders).
• “Engine/Core”: Contains the entry point (Main.cpp) and overall engine logic.
• “Engine/Components” and “Engine/EngineAPI”: Expose an API-based design for game entities, scripts, and transforms, suggesting an entity-component system (ECS) or similar pattern.
• The presence of multiple project files (.vcxproj for C++ and .csproj for C#) along with solution files (.sln) indicates a multi-project solution with clear separation of engine and editor responsibilities.
a. Main Components:
• Engine Core: Including the common utilities, engine core logic, and entry point.
• Graphics Subsystem: Representing the Direct3D12-based renderer (graphics interface, shaders, resources, and surface management).
• Content Tools: Handling geometry and primitive mesh generation or editing.
• Engine API / Modules: The component API (for entities, transforms, scripts) and DLL interface (EngineDLL) to provide modular access.
• Editor (FerrarisEditor): Which provides a GUI (using WPF) to manage projects, assets, and to invoke the engine's functionalities.
• Test Suite: EngineTest modules that ensure the engine’s features work as expected.
b. Relationships and Interactions:
• The Engine Core interacts directly with the Graphics and Platform components.
• The Engine API exposes functionality to both the runtime game entities and the editor via the DLL wrapper (“DllWrapper”) found in FerrarisEditor.
• The Editor communicates with the engine by invoking the DLL functions, managing projects, and providing editors for specific components (like GeometryEditor, WorldEditor, etc.).
• Content Tools might be used during development inside the editor or as standalone utilities to generate or modify game assets.
• Tests interact with core engine components to validate correct behavior (e.g., shader compilation tests in EngineTest).
c. Architectural Patterns and Design Principles:
• Modular / Layered Architecture: The separation into Engine Core, Graphics, API, and Editor suggests a clear modular approach.
• Entity-Component System: With directories for “Components” and engine API definitions for GameEntity, ScriptComponent, and TransformComponent.
• Abstraction Layers: In the graphics subsystem for Direct3D12, there are helper classes, interface wrappers, and common headers to abstract platform-specific details.
d. Technologies, Frameworks, and Libraries:
• Direct3D12 is the primary graphics technology.
• C++ is used for core engine development, with Visual Studio project files (.vcxproj) indicating a Windows-based development environment.
• C# (with XAML) is used for the editor, which likely uses WPF for its GUI.
• Usage of DLLs for engine modularity suggests an emphasis on dynamic linking and separation of concerns between engine and tools.