The Engine Block - Dev Blog #14
Updated: Apr 14, 2021
The engine block is a new type of block that will allow for realistic driving characteristics such as vehicle engine sounds, gear changes and varying power as the engine goes through different RPM ranges.
We are still working on the art for Techblox, but here was one of our early designs. This is NOT how the engine block will look in game
Here’s a mock up of how we’d like the wire widget to look in game.
Ignition (Input) - This determines if the engine is on or off.
Accelerator (Input) - This controls the power of the engine
Gears up (input) - Changes up a gear
Gears Down (Input) - Changes down a gear
Engine (cog output) - This is a special connection and can only be added to parts that have the same icon
For those of you who don’t know about the ‘Wire Widgets’ from Gamecraft, we’re going to do a post next week about this and how we’re improving it for Techblox!
RPM To power relationship
Engines have a torque-to-rpm relationship and we want to reproduce this in Techblox. Below is from a real-world car showing the relationship.
Engines are limited to a ‘max RPM’ to avoid overheating. In a real car, when you floor the accelerator of a car engine that is in neutral gear, the engine does not instantaneously reach max RPM. the engine instead has a maximum rate of change of RPM.
Most cars have gears with different ratios. The aim of the gears is to keep the car within its peak torque for the best power output and acceleration. The graph below is from a real car.
While accelerating it is wise to change gear when the engine reaches a specific high RPM value, and when decelerating it is wise to change down gears at a specific low RPM value. Depending on the vehicle, gear changes can take time.
Wheels in Techblox can spin freely and at different speeds because they are not linked together in any way. Some wheels may be on the ground, others may be in the air, despite being powered by the same engine. For our engine block to know how much torque it will provide it needs to measure the revolutions per minute of the wheels it is driving.
We’ll be processing various variables when working on the engines and these include
- Min RPM
- Max RPM
- Max RPM rate of change
- RPM to change gear up
- RPM to change gear down
- Gear change time
- List of gear ratios
- Manual to automatic gear change cool off time.
This type of engine block design mixed with manual gear changes could make for an interesting game mode around drag racing.
A playable Pre-Pre-Pre-Pre-Pre-Alpha is now available! Make sure to visit our home page at http://www.techblox.com/ to sign up to play it!