Giter VIP home page Giter VIP logo

engine-sim's Introduction

Engine Simulator

Alt text

Warning: code is in development and will change frequently


What is this?

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.

Why is the code so sloppy?

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.

How do I use it?

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

How do I build it?

Note: this project currently only builds on Windows!

Step 1 - Clone the repository

git clone --recurse-submodules https://github.com/ange-yaghi/engine-sim

Step 2 - Install CMake

Install the latest version of CMake here if it's not already installed.

Step 3 - Install Dependencies

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)

Step 4 - Build and Run

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.

engine-sim's People

Contributors

ange-yaghi avatar akcore avatar dogeskii avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.