https://github.com/arkaht/cpp-ekosystem
Ekosystem ─ a simple data-driven simulation game in C++ using Suprengine and ImGui
https://github.com/arkaht/cpp-ekosystem
cpp custom-engine data-driven ecosystem imgui opengl sdl2 simulation
Last synced: 2 months ago
JSON representation
Ekosystem ─ a simple data-driven simulation game in C++ using Suprengine and ImGui
- Host: GitHub
- URL: https://github.com/arkaht/cpp-ekosystem
- Owner: arkaht
- Created: 2024-07-04T21:38:28.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-03-29T16:33:52.000Z (2 months ago)
- Last Synced: 2025-03-29T17:29:33.109Z (2 months ago)
- Topics: cpp, custom-engine, data-driven, ecosystem, imgui, opengl, sdl2, simulation
- Language: C++
- Homepage:
- Size: 192 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ekosystem
**Ekosystem is a C++ 3D "game" focused around simulating a simple data-driven ecosystem of animals.**It is built using [suprengine](https://github.com/arkaht/cpp-suprengine), my custom engine which uses OpenGL and SDL2.

## Dependencies
### Project
+ C++20 compiler
+ OpenGL 3.3.0
+ CMake 3.11### Libraries
+ [cpp-suprengine](https://github.com/arkaht/cpp-suprengine)## Features
+ Data-driven simulation: each animal type is defined by a data asset to specify behavior, movement and visuals (which means you can easily make rabbits carnivore and wolves photosynthetic)
+ Serialization of animals data asset with JSON files.
+ Animals eat according to their metabolism, reproduce within their own species, wander around and flee from their predators.
+ Animals have 3D models and movement animations.
+ Finite State Machine for AI logic, designed mixing with a Behavior Tree.
+ Complete user interface tool using **ImGui** for both system balancing and debugging## Project Structure
This project only holds the engine code since it is de-coupled from games code.**Folder structure:**
+ **`assets/`** contains game assets, such as data defining pawns, curves, etc.
+ **`src/`** contains source files of the game.## Build the project
This project is built using **CMake 3.11**, ensure you have already installed a compatible version.### Steps
0. Create a folder anywhere for the installation, we'll name it `ekosystem`. The reason for this is that the game's `CMakeLists.txt` will attempt to finds the engine's folder directly from its own parent folder, if you don't want that, look at the [Troubleshooting](#troubleshooting) section.
1. Clone the engine's [repository](https://github.com/arkaht/cpp-suprengine) in `ekosystem/cpp-suprengine`.
2. Run command `git submodule update --init` in the engine's folder.
3. Clone the game's repository (this one) in `ekosystem/cpp-ekosystem`.
4. Run the game's `CMakeLists.txt` either by using CMake's command line interpreter, CMake's GUI or your favorite IDE.### Troubleshooting
Change engine's folder location
If for some reasons you want to move the engine's or game's folder apart from each other,
you can configure the location of the engine using the CMake variable `SUPRENGINE_PATH`.Using command line:
```cmd
cd build
cmake .. -DSUPRENGINE_PATH=C:/Path/To/Engine/
```You can also use **cmake-gui** to change this variable.
Couldn't update engine's Git Submodules
If running the git submodule update command didn't work for any reasons, replace the folder `libs/curve-x` by cloning [arkaht/cpp-curve-x](https://github.com/arkaht/cpp-curve-x).
Need administrator privileges to run the CMakeLists.txt
I'm using symbolic links to avoid having to copy the assets folder each time I compile. The problem is that on Windows, the symlink command requires administrator privileges. To resolve that, you can either:
+ Enable Windows developper mode (not recommended).
+ Run your IDE or CLI with administrator privileges.
+ Edit the `CMakeLists.txt` by replacing `suprengine_symlink_assets` with `suprengine_copy_assets`### Credits
+ Wolf model by [Ezgarth](https://sketchfab.com/Ezgarth) from [Sketchfab](https://skfb.ly/698Sv)
+ Hare model by [616](https://sketchfab.com/Hangry_Cat) from [Sketchfab](https://skfb.ly/o9PB6)
+ Dirt texture by [Cethiel](https://opengameart.org/users/cethiel) from [OpenGameArt](https://opengameart.org/content/tileable-dirt-textures)