Overview
dEngine is a simple 2D game engine written in C++. This project was primarily a hobby effort to learn C++ and game development concepts.
The engine uses the SDL library for graphics, audio, and windowing. Its architecture is state-based, allowing different game states (like a title screen or a game level) to be pushed onto and popped from a main game loop. The core dengine provides systems for:
- Game Objects and Components: A base
GameObjectclass that functionality is added to viaComponentclasses, such asSpriteSheetfor animations. - UI System: A UI manager that renders
UIWindowobjects, which in turn are collections ofUIComponentelements likeTextandProgressBarH. - Event Management: An
EventSystemthat allows game objects to register callbacks for user input, such as mouse motion and button clicks. - Audio: An
AudioManagerfor loading and playing sounds. - Logging: A third-party library, NanoLog, is integrated for logging engine events.
In addition to the engine itself, the project also includes:
- packer-util: A command-line utility for packing game assets (like images and audio) into a single compressed
.datfile using zlib. - examples/Game: A simple game demonstrating the engine’s features, including a title screen and a basic level with a player and enemies.
- Documentation: The project is configured to use Doxygen to generate documentation, with a GitHub Actions workflow to automatically build and deploy the docs to GitHub Pages.
Technologies Used
- Core Language: C++17
- Libraries:
- SDL2: Used for windowing, graphics, and audio.
- SDL2_image: Used for loading image formats (e.g.,
.png). - SDL2_ttf: Used for rendering TrueType Fonts.
- zlib: Used by the
packerutility for asset compression.
- Build & Dependencies: CMake is used as the build system, and
vcpkgis used for managing dependencies. - Logging: NanoLog
- Documentation & CI/CD: Doxygen and GitHub Actions