# CyrusEngine (Imperial Edition) CyrusEngine is a work-in-progress C++ 2D game-engine foundation. It provides a GLFW/OpenGL application loop, sprite and shape rendering, FreeType-based text, EnTT entity components, and Box2D-backed physics. The public engine declarations are in `src/CyrusEngine.h`. The current build uses C++23. APIs and project structure may change while the engine is under development. ## Features - GLFW window and application lifecycle, timing, keyboard input, and projection helpers - OpenGL sprite rendering, texture regions, and sprite-sheet animation - Batched 2D shapes, including lines, circles, and rectangles - FreeType font atlas generation and text rendering - EnTT-based entity-component workflows - Box2D physics integration with pixel/metre conversion helpers ## Requirements The documented CMake build is currently intended for Linux. Other operating systems and graphics drivers have not been verified. - CMake 3.20 or newer - A C and C++ compiler with C++23 support - OpenGL development files - GLEW and GLFW 3 development files - `pkg-config` - For the playground target: libsndfile, Vorbisfile, and PortAudio development files On Debian or Ubuntu, install the common prerequisites with: ```sh sudo apt install build-essential cmake pkg-config libgl-dev libglew-dev libglfw3-dev \ libsndfile1-dev libvorbis-dev portaudio19-dev ``` The repository vendors Box2D, EnTT, FreeType, GLM, microui, and stb_image under `src/3rdparty`; the CMake build uses these bundled sources/headers where applicable. ## Build With CMake From the repository root: ```sh cmake -S . -B build/cmake -DCMAKE_BUILD_TYPE=Debug cmake --build build/cmake --parallel ``` This builds the `cyrusengine` static library and the `playground` executable. To build only the engine library, disable the playground (which avoids its audio development-package requirements): ```sh cmake -S . -B build/cmake -DCYRUSENGINE_BUILD_PLAYGROUND=OFF cmake --build build/cmake --parallel ``` The CMake target alias for consumers adding this project as a subdirectory is `CyrusEngine::CyrusEngine`. ### Run the Playground The example refers to assets relative to its working directory. Run it from `examples/playground`: ```sh cd examples/playground ../../build/cmake/playground ``` ## Build With MakeIt MakeIt is also supported through the existing `MakeIt.toml` configuration. With MakeIt installed, run the build command from the repository root: ```sh makeit build -j8 ``` ## Minimal Application Loop ```cpp #include "CyrusEngine.h" int main() { CE::EngineConfiguration config; config.windowTitle = "My CyrusEngine App"; CE::Initialize(config); while (CE::Run()) { CE::BeginRendering(); CE::ClearBuffer(); // Update and render your game here. CE::EndRendering(); } CE::Shutdown(); return 0; } ``` ## Licensing and Third-Party Software Original CyrusEngine project code is offered under the Apache License 2.0; see [`LICENSE`](LICENSE). This license does not replace the licenses for bundled third-party code or assets. Before publishing, confirm that you are authorized to license all original contributions under Apache-2.0. Existing source headers identify historical authors but do not, by themselves, establish the current copyright holder. Third-party components are located under `src/3rdparty`. Preserve their copyright and license notices and review each component's terms before redistributing a source or binary release. Some components include separate license files (for example, FreeType and microui); other notices may be embedded in source files or in the upstream distribution. The repository also contains example fonts, images, and sound files under `examples/assets`. Their redistribution permissions are not documented here. Confirm that you have the necessary rights and include any required attributions before publishing or distributing those assets; otherwise remove or replace them.