This is a real-time internal combustion engine simulation designed specifically to produce engine audio and simulate engine response characteristics. It is NOT a scientific tool and cannot be expected to provide accurate figures for the purposes of engineering or engine tuning.
I wrote this to demo in a YouTube video, not as a real product. If you would like it to become a usable product please reach out to me or join my Discord (link can be found in the description of the aforementioned YouTube video). I use this codebase for my own purposes and so it might change frequently and without warning.
The UI is extremely minimalistic and there are only a few controls used to interact with the engine:
Key/Input | Action |
---|---|
A | Toggle ignition |
S | Hold for starter |
D | Enable dyno |
F | Enter fullscreen mode |
Shift | Clutch |
Up Arrow | Up Gear |
Down Arrow | Down Gear |
Z + Scroll | Volume |
X + Scroll | Convolution Level |
C + Scroll | High freq gain |
V + Scroll | Low freq noise |
B + Scroll | High freq noise |
N + Scroll | Simulation freq |
Escape | Exit the program |
Q, W, E, R | Change throttle position |
1, 2, 3, 4, 5 | Simulation time warp |
Tab | Change screen |
Note: this project currently only builds on Windows!
git clone --recurse-submodules https://github.com/ange-yaghi/engine-sim
Install the latest version of CMake here if it's not already installed.
You will need to install the following dependencies and CMake will need to be able to locate them (ie. they need to be listed on your PATH):
1. SDL2
2. SDL2_image
3. Boost (make sure to build the optional dependencies)
From the root directory of the project, run the following commands:
mkdir build
cd build
cmake ..
cmake --build .
If these steps are successful, a Visual Studio solution will be generated in build
. You can open this project with Visual Studio and then run the engine-sim-app
project. If you encounter an error telling you that you're missing DLLs, you will have to copy those DLLs to your EXE's directory.