Vehicle Engines

@Iyagovos said in Answering Frequently Asked Questions:

Hi there!

I asked the developers, here's their response:

Engine emulation is still the same at its core, there is still no "tension-o-meter". But there are many improvements both to the behaviour of the vehicle (tension relative to pedal input) and to sound effects (loudness relative to RPM). There are some plans for future improvements in patches too.

I hope this answers your question!

So, in 'old' versions of Spintires (pre-Workshop) the setup for the engine/gearbox simulation/emulation was like this:

<VehicleConstraint>
<ReverseGear Torque="145722" AngVelMin="-5.3" AngVelOpt="2.65" AngVelMax="6.05" MaxDeltaAngVel="0.1" />
<HighGear Torque="214456" AngVelMin="-3.6" AngVelOpt="1.8" AngVelMax="4.11" MaxDeltaAngVel="0.1" />
<Gear Torque="258381" AngVelMin="-2.99" AngVelOpt="1.49" AngVelMax="3.41" AutoNextLinVel="1.21" MaxDeltaAngVel="0.1" />
<Gear Torque="176161" AngVelMin="0.55" AngVelOpt="2.19" AngVelMax="5.01" AutoNextLinVel="1.76" MaxDeltaAngVel="0.05" />
etc etc
</VehicleConstraint>

And it was good. By manipulating the Min/Max/Opt(imal) AngVel values you could simulate almost any kind of engine: low revving 1950's diesels, modern turbodiesels, high revving petrol engines, even electric motors (which have max torque at 0rpm). I even made a Gearbox Calculator Sheet that would calculate all the torque/angvel values, and even shiftpoint values for any engine/gearbox combination that is physically possible (I even manged to do a good approximation of how a torque converter multiplies the input torque when it isn't locked).

But then everything changed (without any explanation, or any particular reason!) and almost all of the gear-specific information was no longer read from the truck xml file, and was calculated based on a starting torque value, and the AngVel (actually the renamed AngVelOpt) value for each gear:

<Motor MaxDeltaAngVel="0.025" Torque="200364">
<ReverseGear AngVel="0.51" />
<HighGear AngVel="3.9" />
<Gear AngVel="0.42" />
<Gear AngVel="1.49" />
<Gear AngVel="1.8" />
<Gear AngVel="2.01" />
</Motor>

And now only engines that fit the 'default' torque curve can be simulated with any accuracy. And of course, because of the calculated AngVelMin/AngVelMax (and the shift up/down points) you can only use gearboxes that have a certain level of reduction, because if you make the AngVel value for 1st/Reverse too high the vehicle will be unable to move. Not 'it won't work very well' but 'it won't work at all.'

So please. Please revert the changes that Pavel made to engines and gearboxes and give us back the ability to accurately simulate everything from SUVs (UAZ-469) to Tank Transporters (MAZ-535) and everything inbetween.

Hey there! I've spoken to the dev team, and here's their response for you - let me know if you have further questions.

The biggest issue with the old engine/gearbox setup was that allowed, well, exactly what you're looking for, 'non-default' torque curves.

What that leads to is all kinds of physics bugs, as the game engine is simply not designed for non-default torque curves, mostly with regards to the wheel physics, which are simple Havok rigid bodies, and so they can't handle high torque.

Additionally, the new engine/gearbox setup has fewer parameters so its easier to start modding.

If there's high demand for it, though, we may be able to add a toggle that allows you to revert to how the old engines worked.

@Iyagovos said in Vehicle Engines:

The biggest issue with the old engine/gearbox setup was that allowed, well, exactly what you're looking for, 'non-default' torque curves.

What that leads to is all kinds of physics bugs, as the game engine is simply not designed for non-default torque curves, mostly with regards to the wheel physics, which are simple Havok rigid bodies, and so they can't handle high torque.

1st highlighted: I don't buy this. At all. Spintires was literally designed with the 'old' gearbox setup, and worked like that (with no reported problems as far as I am aware) for several years before it was changed.

2nd highlighted: I am personally only aware of a very few instances where high speeds (but torque less than the stock values for a KrAZ-255) caused some issues (usually when transiting from mud to solid ground, or other situations where the vehicle went from no/low traction to full traction) but no real troubles running even up to 500000 for a torque value. Obviously unrealistic values give an unrealistic result.

A very easy way to 'fix' the problem noted in my earlier post (unable to start moving in 1st/rev) would be to make the AngVelMin calculation for first and reverse only be something like: AngVelMin=0-AngVelOpt;

Instead of: AngVelMin=AngVelOpt*0.5 - 2.0; like it is currently (in Spintires)

Which would guarantee 50% of max torque from rest. This is ofc what the clutch in a vehicle is for, so you can rev the engine to produce more power/torque when the wheels aren't spinning (and change gears, but yeah) allowing you to do cool things like start a vehicle moving.

I always thought the new engine/gearbox was much better than the old one.

@Pressure-Line You are completely right!!!That's what you need to do!!!