Wheeled vehicles move by applying torque (generated by the engine and effected through the transmission) to the wheels. Torque at the wheels (t_wheels) means that a „torque force” (F_t) is applied at the circumference of the wheel with a given radius (r_wheels), according to the equation:
t_wheels = F_t*r_wheels
Solving for „torque force”:
F_t = t_wheels/r_wheels
In order to make a vehicle move, this „torque force” needs to be larger than the force of friction (F_fr):
F_t > F_fr
This is actually different for trying to start moving and for trying to accelerate a moving vehicle – respectively passive and active friction. While we could go into this, the gameplay benefit would be IMHO marginal, so I’ll assume that passive friction:=active friction.
The force of friction results from the body with a total mass (m_total) pushing against the ground, which has some friction coefficient (coeff_fr) with its weight (W).
Actually, the slope of the land plays an important role in all this, but again, this might be too complicated in regards to its gameplay value, so I’ll skip it.
Weight is the product of mass and the local gravitational acceleration (g):
F_fr = W*coeff_fr
W = m_total*g
Thus:
F_fr = m_totalgcoeff_fr
Going back to our criteria for sufficient force (F_t > F_fr) and substituting F_fr for the above, while remembering the expression for „torque force” (F_t = t_wheels/r_wheels) we get:
t_wheels/r_wheels > m_totalgcoeff_fr
Or, solving for m_total:
m_total < t_wheels / (r_wheelsgcoeff_fr)
Ok, now we know the maximum mass of a vehicle that can be set in motion with a given torque at the wheels and wheels of a given size on a terrain with a given terrain. If the green criterion is met, the vehicle will move, powered by a non-zero driving force (F_wheels) that is the difference between F_t and F_fr:
F_wheels = F_t – F_fr
Before we use our knowledge of the driving force to calculate the attainable linear acceleration (lin_acc), we need to get the inertia of the wheels (I_wheels). One wheel can be simplified as an uniform hoop of a given mass (m_one_wheel), which has an inertia (I_one_wheel) of:
I_one_wheel = m_one_wheel*(r_wheels^2)
Therefore, for a car that has several wheels (number_of_wheels):
I_wheels = number_of_wheels*I_one_wheel
Substituting the expression for I_one_wheel:
I_wheels = number_of_wheelsm_one_wheel(r_wheels^2)
It is important that I mention that this is based on the assumption that torque is spread evenly to all wheels…
Here we can implement the type of drive – four-wheel /two-wheel / all-wheel drives would be IMHO a lovely (and easy) addition. How about being able to take a larger load in return for lower acceleration ?
…which allows us to calculate the angular acceleration (could be averaged if we incorporate the F_wheels calculation for each wheel separately – we actually should do that, to emulate the drop in performance when driving even partially off the road) for the wheels:
lin_acc = F_wheels / I_wheels
Substituting everything above into the red equation we get:
lin_acc = ((t_wheels/r_wheels) – (m_totalgcoeff_fr)) / (number_of_wheelsm_one_wheel(r_wheels^2))
This could be divided into two separate bits, one related to torque and the other to total mass:
lin_acc = (t_wheels / (number_of_wheelsm_one_wheel(r_wheels^3))) – ((m_totalgcoeff_fr) / (number_of_wheelsm_one_wheel(r_wheels^2)))
That’s all folks ? No way !
The torque at the wheels and the torque generated by the engine are two different things. The torque an engine produces is dependent on its rotations per minute (RPMs). Typically an engine has a range of RPMs at which it produces the maximum amount of torque – its operation is most efficient in that range. If we used a direct transmission, the engine torque would be effected at the wheels (with some loss, of course), however the wheels would rotate at the same RPM as does the engine.
The issue with that is that the wheels would either rotate very slowly with incredible torque or very fast with barely any torque whatsoever. Neither is good, therefore, the transmission uses gears, which can be shifted.
Assumption: All Cata:DDA cars have automatic transmission, making the engine operate in its zone of maximum efficiency, regardless of speed.
The above seems to be in effect already, as we don’t need to change gears / worry about RPMs.
Assumption: Existing gears are not discrete but continuous. Hence, torque*RPM = constant = engine_power.
This is also seemingly true in the current system. However, this has an implication, which can be used to complete the system:
Postulate: Torque at the wheels (t_wheels) is an inverse function of the current speed of the vehicle. Hence, acceleration becomes an inverse function of current speed.
Done.
Proposal 1: Give each type of terrain (and seasonal terrain, if winter comes) a parameter called friction coefficient.
Proposal 2: Use the friction coefficient to calculate the attainable acceleration of a vehicle on different types of terrain.
Proposal 3: Scrap the safe / max speed and replace them with (terrain-dependent) acceleration.
Proposal 4: Make acceleration dependent on current speed of the vehicle.
The following proposals are non-core to my concept, but IMHO are worthwhile, so I’ll list them now and flesh them out in successive posts (if you find them interesting).
Proposal 5: Implement different drive system types (2-wheel, 4x4, all-wheel).
Proposal 6: Add axles (for wheels to be placed on – same mechanics as mounting seatbelts on seats), transmission (linking the engine and axles – using the mechanic for pathfinding that is used for checking whether a part can be removed from the vehicle).
Proposal 7: Give some variety to axles / transmission / controls – we could have systems designed for high efficiency (vide sports cars) or for heavy-duty work (vide trucks / APCs). Make matching the parts to the vehicle important – axles break when too much torque is transmitted through them etc.
…sorry for yet another "OMG ! WTF ! wall of text, but we had a nice discussion on Git regarding Road Rollers, which evloved into an idea of tweaking the vehicle speed system a bit. The discussion within motivated me to post this one - basically my viewpoint on what would be a logical and fun system. Please share your opinions - this idea should be corrected and augmented through a collective consensus.