back to home

ange-yaghi / engine-sim

Combustion engine simulator that generates realistic audio.

9,269 stars
866 forks
138 issues
C++CMakeC

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing ange-yaghi/engine-sim in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind-ai.vercel.app/repo/ange-yaghi/engine-sim)
Preview:Analyzed by RepoMind

Repository Summary (README)

Preview

Engine Simulator

Alt text

Engine Simulator has moved!

To get the newest releases of the game, click here.

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.

How do I install it?

This is a code repository and might not look like other software that you're used to downloading and installing (if you're not familiar with programming). To download a ready-to-use version of the application, navigate to the releases page, find the most recent release (ex. v0.1.5a), click "Assets" and download the .zip file with a name that starts with engine-sim-build. Unzip this file, then run bin/engine-sim-app.exe. The simulator should then start normally.

Check out our Frequently Asked Questions if you need more details.

How do I use it?

The UI is extremely minimalistic and there are only a few controls used to interact with the engine:

Key/InputAction
AToggle ignition
SHold for starter
DEnable dyno
HEnable RPM hold (see below for instructions)
G + ScrollChange hold speed
FEnter fullscreen mode
IDisplay dyno stats in the information panel
ShiftClutch (hold spacebar at the same time to slowly engage/disengage)
Up ArrowUp Gear
Down ArrowDown Gear
Z + ScrollVolume
X + ScrollConvolution Level
C + ScrollHigh frequency gain
V + ScrollLow frequency noise
B + ScrollHigh frequency noise
N + ScrollSimulation frequency
MIncrease view layer
,Decrease view layer
EnterReload engine script
EscapeExit the program
Q, W, E, RChange throttle position
Space + ScrollFine throttle adjustment
1, 2, 3, 4, 5Simulation time warp
TabChange screen

Using the RPM hold

The RPM hold feature will hold the engine at a specific RPM and also measure the engine's horsepower and torque at that RPM. You can enable RPM hold by pressing the H key. You must then enable the dynomometer (press the D key) in order for the RPM hold to take effect. To change the hold speed, hold the G key and scroll with the mouse wheel. The RPM hold will be shown on the DYNO. SPEED gauge in the lower left of the screen.

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 build it? (Ignore this section if you're not a developer!)

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)
4. Flex and Bison

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.

Patreon Supporters

This project was made possible by the generous donations of the following individuals!

Grease Monkeys

<!-- --><!-- --><!-- --><!-- --><!-- -->
Devin@HondatuningsuitenutDevin C MartinezWelcomeCatSaints Sasha
Ida 8858EmilySteelorseKruddySgt. Fluff
darcuterFatFluffyFoxBenton1234Jim C K FlatenThe Zuck
Blade SkydancerYe' old appleHayden HendersonAlphaXLucas Martins Bündchen
Jay DogdamoIBS-IS-CRAPSnowyNoah Greenberg
EisbergBrendan M.Alex LaytonLukas BarteeThibaut Dubuisson
The Cheeze ItyJoeJimTomMichaelB450BjörnBartdavy
sasha bandelierCaleb BlackCOOKIESAndrew Cooperasimo3089
Vim WizardKevin ArsenaultCarl LindenKele TappiKroklethon
labourateurviperfan7SlimmyJimmyJason BeckerSascha Kamp
vesSupernalbootBeamNGPaul HarrisonTyler Russell (Nytelife26)
nicholas jacobsDrDotMadnessAVeryPlainTylerZach PerezPaul Schaefer
Clay BauerCR33DYM0N14julien nadeauPatt313Philip Edwards
RegularRuby670Mateusz ŁadoszFémLol StúdióCrazy YanyElden
Tristan WalkerMatthew McDonaldJan-Sander HuitingMitchell AlmstedtDylan Lebiedz
Name HereLoganBoi FNAFEpic RandomnessMrPiThonmike
dungAlvaro ArroyoZamoraSkinna GodwinBeppoBaroneレナVA
SabataBrady FulhamPowerpuncherNK10KGavin Osowski
OrbitstriderSteven DoyleJaksu2696ToniDevin Abolins

Tuners

<!-- --><!-- --><!-- --><!-- --><!-- -->
Boosted MediaMatthew McLennanVenicanLyan le GolmuthAlberto R.
BetaToasterAkira TakemotoJ AndersonApolly007LexLuther
xilophorRobert Kviktor lindAdrian Kucinskisarowie .
Chris FischerMarlodChase HansenAidan SzalanskiAndrew Taylor
Jason HwangJuuso NatunenIan MossPickleRickBeljim46
RSOFT92UCDSpedOldManJenkinsJames Hart
Kalle NilssonXxBrasta455xXColin SandageDakota MackinnonCarter Kopp
Jakub KozakCJ PlessasLoizeauCharles MillsYellowLight
Didrik EsbjugAlessandro Dal PinoCarter WilliamsRobert DCadence Plume
BLANKProvenance EMUDylan EnglerNathan RojasCornelius
AcidlarsloveslegosMaxime DesagesGMBreadForMen
Devin FreemanLieven RYCKEBOERAmelia TaylorJelle Plukkersodmo
Jimmy BriscoeCirithorMartin .KDMartlandLucas Diem
Richard BudíčekJack SheppeardMeemenAnderson HuynhNPException
Mattia VillaCAIDAN POWELLBrenn_the_OtterLane Mosier
Cezeoranjest1JwISONMathew Graham
MACHINAJohn CrowellAsher BlytheCronos SkiesMatt Amott
CpTKugelHagelSimon KrayerCaleb BekMonster Man25GeneralMoineau
EsuKurimuCaleb SartinJared L.Hunter WoodBen Poole
Steven VictoriaJordan ZondlakAgelessgodChristopher FahsJonathan Vincent
Dalton GuillotSimon StojanovicAndrew UrbanczykdeniaLTyler Hughes
vPamJustin KruithofCurtis C CoomberSawyer ClarkMike Hart
Ciro RancourtMiles GuoRewindE=mc^2Keaton Call
J.EsJeremy BChance HallJack TompkinsRace Sim Studio
Quentin ZAOUIFloyd HendersonJames HaylowMilkshiekhWyatt Todd
User 2820Leon SchutteCYBERBUG_JRsebiiiKeegan
Victor CosiugaRolly !Elias PetterssonTyson MakovecBill McDermott
PhontonicSimon ArmstrongavecKidozyGAME (Dead)Stephan Cote
Justin BiggerstaffJabba JubbanotD34THNIGHTInventorWesley Bear
Supersonic2510PixelSimon BernhardtBas VangermeerschToyotaCipra
kyle crawfordApatheticWoodBen VaughnErich WesthovenZack Myers
TbjoernVetle HøgåsDerek ThomAaron Beck

Junior Mechanics

<!-- --><!-- --><!-- --><!-- --><!-- -->
Karol SzépLeon JordanNathan HigginsonPatrick FSamuel Picard
Alexander FritschLucas ScarpiJack HumbertG2EnekoSweCreations
Marius BeckerCedric Willeinfernap12Julian DingesWamuthas
Alex MasonHawar KaremMelonenstrauchJacek DębskiAlex Eastman
Darren TaingPo WangGiorgio IannucciLevisEden
Alin ChiparatuArjun MandakathA.M.Dylan RyanNoah Entrekin
GT130Josh DgenericHenrik CohrsNic Yetter
Dan Fredriksen153AN1MJRasmusEpicEchoKaur Hendrikson
Maddox PartridgeL33TIFY_Zack FletcherteiiioMike Zaite
Evan SoninChristopher ZimmermanPrefacedVasefuntomrTriton Alabaster
appelpieJulien FerlucAnomalousFerret_Miles OrozcoSpencer Teeter
ThatCanadianHarry PrabowoDylan RogersonJaedyn AllenZephyr Sefira
Alexander StoneMason LittleWojciech Czopryzen5Kosta Diamantis
Karol StodolakTim van der LindeLoïc RuttnerjonthefuzzAsgarK
James MorganElijah1ntlTobias JohanssonMome
PSOPA_ShingekuroSean KingRussell Marsh
Alyx RanasNaters305ChrisakaMrXDNicsean
Zach HagedornJhon lenonEverett ButtsKyanranger Nation
Hiago OliveiraTexiMrRhodyInglorious BastardMarty Mitchell
Justin ChaoManuelSCornelius RössingPedro FreireAnthony Stuart
Hubba NubbaSkychiiJoe UnderwoodXander_Notbigdank
Sander D.Lars JoostenDanksaMetrostationMyles Wommack
Derrick SampsonCorey HannenMatteo La CorteOctothorp ObelusDavid Baril
Soyuz KafireIvan CohaBigElbowskiApolepthJulian Krad
David SoulieresEric HuangLéo ViasRiccardo MarianiVic Viper
ShinkaaaaMumaransaMichael BanovskyHendrik VossInverted Blackhat
skipyCTobias Moorjaky3 .Clément LEGRANDIan C. Simpson
ChallierJan Przemysław DrabikDsand23Smooth DLXThe German Dude
CrazyEagleJordon GoodmanHenryWithaG .Oscar KrulaBrayden Moore
StevenNall WolfertpapajonkAndrewBen Kingston
Julian VoglMaxime LubranoMrMekouilDoudimmeJacob Hultberg
Nolan OrloffMiketobi9899Danila FrolkinXecotcovach
AjCarcar404John MartinDominik GreinertLukas Stadler
Oliver Yangsonax51Marcel KlimentChrisDavid Rush
LethalVenom13Dave OsterhoffAnto1709BenMorgan Munroe
Ivor ForrestSam HopkinsAtteDaxWilliam Bergström
homelessmemeThanleftZaxergRobelooxMaximilian-Lukas Marz
MorgnSeth Monteleoneplayfulmean videosLanimations LABram G
Benoit FournierBernar LepillerNicolas BaurtheSnekers
DarkmountTobiasz MichalikAidas RiDaniel PostlerSkim_Beeblez
ImpetusThunderbird324Fred JossKrzysztof RadowskiAzerrty
Harrison SpeckMatt BakerBigLynchMarkus PeltoIMBIBE
James L PlummerRose GilesJonas BrekkaHASTRXLepoucehumain
Naomi HuminqkrrudgksJohann GrossJanis KnappichWhatTheDuck
테루Glimple BortJacob TudiscoTannerJulian kaspi
nathan gouldRandal Rainis KruusBeppierreCraig MartinThomas Bukovsky
ColaxeRobert OramMatsuy15 LKacpeAlex Sedlic
Mark BensonMhenn!Anders NelsonDingusRustle
Marco Schulzstratumbrochier gabrielThomasbrody of hillcountry
Thomas AffordBrody BlaskieMartien GamingAdrien MCWilliam A Grubbs
Trevo Ph.D.Donovan GibsonPolish R3t4rdKeith PriceLAWL CAKE
Rhien SchultzFireThrow13SeraphimTitus StandingMatt Miklos
B DubJonathan EkmanAl PomeroyVestiiWil
adrianAiratiseTJ SinkoskiShotts SilverStoneReagan Carbaugh
WarAestheticsRebootedAidan CaseCasey Bryant GoodwinKonradAdam Larcher
Kazar Xin XiaoRiccardo MarcaccioWilliam S.Francis FilionLoïc
Kenny DeaneBlackspotsmikeMXTJoshua Gibson
milky boiHagengunmaster929jgvanBenny 282
Sean WehnerChristian PooleEthanTsukiyama ShuuOoof_uhhh_haah
sano ken chDiego MartinezChuckGalaxyFrogsTheGeForce
ChriphostCarthageGreg LChipskateMuhammed Mehmood
Hamilton SjobergAmina MohvSiiFTJeremy WrenEsteban Acosta
John A UllenbergMichael MorozovAndrew WebberleyNathaniel LimAaron Ksicinski
ApocalyptJosh batuzichEdHunterGene Brockoff
Redheadspellslinger.Pablo MagariñosNilzJose Manuel Silva CalvoAJ
Ethan WilleAuroraDerek ShuniaJanNope Mircea
Giancarlo CestariTanner Edgebrad.Connor MerrickMartin Scholer
DeppyDan SmithTysonJac ComeauItemfinder
Tischer GamesPedro HenriqueBeenWashedUpmartin wolffKurt Houben
Thomas OnslowBrendan PuglisiKai AnquetilRudolph IgnatenkoCloudHackIX
Zach CarreauJonathan VanderlynKrobivnovienergyLeifster
Mikael KaaronenGlenH.HelsingangeThe Nobles
Johnathan JohnsonJuha MerentieJim FaresTom MarshallSuperferrariman
Zakary ZisaJustTy晟道 杜Dnialibr WilliamsTakumi Fujiwara
Koen van HalJonathan HillMarco SicilianoKevindosenfutterAngry Prawn
Natharic 67Rafael MonteiroJacob AshlineChironTheFloofCaleb Dauphinee
TonyZac LAlainMoto FPVeirik johan johnsenElderet
Miles Longmorelemon headViccyCaseyKajetan Cupa
Conejero00Bill GrickoA cow wearing a turbanDanni NowickiUdo Schmidt
Tyler SwordsConstellation GamingManimovalentineJules Schattenberg
Brandon CrottsPhilipp PopetschniggTiziano Della Faziagoodgamer1109Joshua Thomas
Jeff TestaAvery SnyderJosh KernTriptagramBayon Antoine
Iván Juárez NúñezAmery MartinatElArGeeCory Greenlucas Di lorenzo
Caleb Sandersier