We are not aiming to implement a complete simulation of an actual gas engine for a bike; this will take too long and demands an in-depth understanding of the physics and mechanics of a real-world engine. But we will aim to simulate, to a minimal degree, some standard components of a high-speed vehicle's motor. So first, let's break down the expected behavior of each part of our engine, as follows:
- Cooling system: The cooling system is responsible for making sure the engine is not overheating. When the turbocharger is activated, the cooling system shuts down during a turbocharge. This behavior means that if the player overuses the turbocharger, this can overheat the engine, and in consequence, the engine will stop or explode and the bike will stop moving.
- Fuel pump: This component is responsible for managing the fuel consumption of the bike. It knows the amount of gas remaining and stops the engine if it runs out of it.
- Turbocharger: If the turbocharger...