How alexiynew/engine_v2 works
Project type and purpose
• This is a C++ “modular” game engine, built with CMake, that provides a core API (Engine Core) and a set of pluggable modules (backend, graphics, input, resource management). A small “game” in the top-level game/ directory demonstrates how to use the engine.
File structure
Top level:
• engine/ ← engine source, headers, modules, tests, CMake files
• game/ ← sample game, assets, shaders, CMake
• CMakeLists.txt, presets, .clang-format, .gitignore, LICENSE, etc.
Under engine/:
• /engine ← public engine API (Engine, Game, Events, Graphics, Input, ResourceManager interfaces)
• src/ ← engine implementation (engine_impl, event_system, renderer_impl, resource_manager_impl)
• modules/ ← module definitions and implementations
– backend/glfw ← real window/input backend
– backend/stub ← fallback stub backend
– graphics/opengl ← real OpenGL renderer, texture, shader, mesh implementations
– graphics/stub ← stub graphics
– include/modules ← module interfaces & module‐locator
• entry_point/ ← small “main” that bootstraps the engine
• tests/ ← unit tests for engine_impl, events, etc.
• third_party/ ← external CMake wrappers (glm, gtest)
README
• The README simply states “Game engine.” It implies the project’s purpose is to provide a reusable engine core plus modules to build games.
Components
a. Main components
• Engine Core
– EntryPoint
– Engine (engine_impl)
– Event System
– Resource Manager
– Renderer (abstract)
– Module Locator
• Modules
– Backend Module (GLFW or Stub)
– Graphics Module (OpenGL or Stub)
– Input, Resource Loader modules
• Game Layer
– Game code (game_create, game.cpp)
– Assets (models, shaders)
• Third-Party Libraries
– GLFW, Glad, GLM, GTest
• Build System
– CMake entry points and presets
b. Relationships & interactions
• EntryPoint → Engine Core: initialization
• Engine Core ↔ Module Locator: discovers & loads backend/graphics modules
• Engine Core → Backend Module: window management & input events
• Backend Module → Engine Event System: injects input/window events
• Engine Core → Graphics Module: render commands
• Graphics Module → ResourceManager: loads shaders, meshes, textures
• ResourceManager → file system / third-party loaders
• Game Layer → Engine Core: calls start/update/render via Engine API
• Engine Core → Game Layer: event callbacks (e.g. OnUpdate, OnRender)
c. Architectural patterns & design principles
• Modular architecture with module-locator (dependency injection-like)
• Separation of interface (include/) vs implementation (src/)
• Pluggable backends & graphics implementations (stub vs real)
• Clear layering: Core → Modules → Third-Party
d. Key technologies/frameworks
• CMake for build configuration & cross-platform builds
• GLFW for windowing & input
• OpenGL via Glad for rendering
• GLM for math types
• GTest for unit tests
Detail
• Every major header folder as a component: Events, Graphics, Input, Resource Management
• That there are two implementations (stub vs real) for backend and graphics