Before implementing OpenGL, physics, or window creation, we need to define the engine’s
A strong module layout separates a hobby project from a production-quality engine.
This article defines the
The engine consists of six primary modules, each with one clear responsibility.
Responsible for:
This module contains
Responsible for:
This module handles all platform-specific functionality, including window creation, input events, and timing. It abstracts away the underlying OS and library details from the rest of the engine.
Responsible for:
The renderer is
Responsible for:
This module ensures that:
It serves as the engine’s “asset manager”.
Responsible for:
Simulation depends on math, but not on renderer. This separation ensures physics can run headless.
Responsible for:
This module provides shared utilities without creating dependency cycles.
A clear folder structure keeps the engine organized as it grows.
engine/
include/
math/
platform/
renderer/
resources/
simulation/
utils/
src/
math/
platform/
renderer/
resources/
simulation/
utils/
examples/
thirdparty/
CMakeLists.txt
Key principles:
This structure scales cleanly with the engine.
Public headers (in include/):
Private headers (in src/):
This separation keeps module boundaries explicit.
Each module has its own CMakeLists:
add_library(engine_math)
target_sources(engine_math PRIVATE src/*.cpp)
target_include_directories(engine_math PUBLIC include)
This approach keeps:
The engine must prevent dependency cycles and hidden coupling.
math → (no dependencies)
platform → math
renderer → math, platform
resources → math, renderer
simulation → math
utils → (no dependencies)
renderer → simulation
simulation → renderer
platform → renderer
any module → utils internals
any module → another module’s src/
These constraints protect the architecture from gradual breakdown.
GusOnGames is part of a broader ecosystem:
GusOnGames covers:
BeforeTheMesh and TheMeshProject cover:
Despite overlap in mathematics, simulation, and rendering, these domains differ fundamentally in:
GusOnGames therefore remains a
Different goals
Different performance profiles
Different user expectations
The GusOnGames engine is free to evolve according to the needs of simple games and physics simulations — without inheriting the complexity of CAE tools.
This keeps the GusOnGames engine clean, focused, and true to its purpose.
This article established the engine’s architectural foundation:
This layout forms the engine’s backbone and provides the foundation for every article that follows.