A game and custom-built game engine designed for creating simple, top-down strategy games.
.vscode | ||
apps | ||
data | ||
demo | ||
editorconfig | ||
include | ||
scripts | ||
src | ||
tests | ||
.clang-format | ||
.clang-tidy | ||
.clangd | ||
.gitattributes | ||
.gitignore | ||
CMakeLists.txt | ||
Doxyfile | ||
LICENSE | ||
README.md |
Elemental Game and Custom-built Game Engine
Welcome to Elemental Game, a game and custom-built game engine designed for creating simple, top-down strategy games. This README provides an overview of the project, its design principles, goals, and instructions for building and testing.
Getting Started
Build Tools
- CMake (version 3.21 or higher)
- C++17-compatible compiler
Project Structure
- src/: Contains the engine logic, defines a libray target
- apps/: Contains the game source, as well as source for resource editors, all consumers of the engine target
- test/: Contains unit tests
Library Dependencies
- Catch2 v3: Test framework for C++ (can be fetched using FetchContent).
- FakeIt: Mocking framework for C++ (fetched using FetchContent).
- SDL2: A cross-platform development library providing low-level access to audio, keyboard, mouse, and display functions.
- SDL2_Image: An extension library for SDL2, offering support for loading various image file formats.
- SDL2_Gfx: A graphics primitive extension library for SDL2, providing additional functionality for efficient graphics rendering.
Building the Project
-
Clone the repository:
git clone <URL>
-
Navigate to the project directory:
cd elemental-game
-
Configure your build system:
cmake -B debug -G Unix Makefiles # or cmake -B debug -G Ninja # this is faster and more modern
-
Invoke your build system
cmake --build debug
Running Unit Tests
-
After building the project, you can run the unit tests:
cmake --build --target ctest
This will execute the Catch2 test suite.
License
This project is licensed under the MPL 2.0 License.
Catch2, which is used for unit-testing is © Catch2 authors, and is licensed under the Boost Software License v1.0 FakeIt, is also used for unit-testing and is © Eran Pe'er and is licensed under the MIT License