How thatalloguy/catos works
Project Type and Purpose
• Catos Engine is a cross-platform game engine written in C++ with Python scripting support.
• It comprises three main deliverables:
– Editor (GUI tool to assemble worlds)
– Player (runtime application to run games)
– Runtime (core engine library used by both Editor and Player)
Top-Level Components
a. Editor Application
– Source: Editor/src/catos/Editor
– Uses ImGui and GLFW/SDL for UI, loads world data via Runtime serialization & scripting.
b. Player Application
– Source: Player/src/catos
– A lightweight runtime to run a built game using the Runtime library.
c. Runtime Library
– Source: Runtime/src subdivided into:
• core (application, window, reflection: registry, typeinfo, property, method)
• io (reader, writer, YAML backend)
• math (vectors/matrices)
• objects (scene graph, Node3D, Camera3D)
• renderer (shader, mesh loaders, texture, renderPass, passes: MainPass, ShadowPass)
• scripting (ScriptingEngine binding via Python/pocketpy)
• stl (custom string, vector, hashmap)
d. Assets & Shaders
– Shaders (GLSL) in Assets/Shaders and top-level Shaders/
– Sample Python scripts in Resources/Catos
e. Third-Party Dependencies (doctest, fastgltf, SDL3, rapidyml, imgui, stb_image, spdlog, pocketpy)
Relationships & Data Flows
• Editor → links against → Runtime (core + io + renderer + scripting)
• Player → links against → Runtime
• Runtime → invokes → External libraries (GLFW/SDL, OpenGL, Python interpreter, YAML parser)
• Runtime/io ↔ loads/saves ↔ Assets (YAML scenes, binary assets)
• Renderer ↔ loads ↔ Shaders (+potential future HLSL via SDL_GPU)
• Scripting ↔ executes ↔ Python scripts in Resources
Architectural Patterns & Design Principles
• Modular layered architecture
– Core abstractions (reflection, application, window) at the bottom
– IO and serialization layer on top of core
– Renderer and scene graph layer using core + math + io
– Scripting layer binds C++ reflection to Python
• Plugin-style render pipeline with customizable RenderPasses (framegraph concept)
• Entity-Component-System flavor via scene graph (Node, World)
• Custom STL demonstrates self-contained dependencies
Essential Elements
– Annotations for key frameworks (GLFW, SDL3, rapidyml, pocketpy, spdlog)
– Note the reflection system driving serialization & Python binding