Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upIncreases effect of mass on vehicle speed #9202
Conversation
Aenye
changed the title
Increases effect of mass on vehicle speed.
Increases effect of mass on vehicle speed [WIP]
Sep 23, 2014
This comment has been minimized.
This comment has been minimized.
|
So how does it affect it now? |
This comment has been minimized.
This comment has been minimized.
|
Increases the significance of mass eightfold. Large (PC-built) trucks make juggling total mass / amount of wheels worthwhile. The change is much more punishing to smaller vehicles. Then again, loading a bike with 1000 kg of stuff and riding it (not to mention riding it fast) is impossible, isn't it ? Would appreciate some opinions on this one - eight times seems proper to me, but it might be too much. |
This comment has been minimized.
This comment has been minimized.
|
Probably should implement total_mass() variable in max speed calculation. |
This comment has been minimized.
This comment has been minimized.
|
Got k mass factors to go as low as 10% for bike+trunk loaded up to full capacity. Rollers still oscillate in 80-90% with their enormous wheel area... If we wanted to make a physical model, keeping to "realistic speeds" (no 10 000 km/h, please), the max/safe-for-engine speed you can drive at would theoretically be limited only by how long you can keep on accelerating. Practically, however, the wheels would eventually lose "grip" (handling ?) of the road, hence the spoilers on race cars. Air resistance, while significant, would really come into play at really high speeds, unless we're driving something terrible in terms of aerodynamics (large truck with a flat cab), but even then, the effect isn't that large. IMHO, the system should be focused on acceleration rather than safe/max speed. Here, the big bad boys called active friction (and, therefore, mass) and inertia come into play, along with some of their smaller buddies. If anyone's interested, I can derive the proper equations and come up with an interesting (and realistic) model, but I'm most likely still too inexperienced code-wise to implement it... |
This comment has been minimized.
This comment has been minimized.
|
Max speed and safe speed should have same variables, but safe speed will be more dependent on mass and friction (dependent by mass and friction rate). Heavier vehicle is, bigger difference between safe and max speed. If I mount engine on bicycle, it should run on it's max without breaking. |
Aenye
changed the title
Increases effect of mass on vehicle speed [WIP]
Increases effect of mass on vehicle speed [CR]
Sep 23, 2014
This comment has been minimized.
This comment has been minimized.
|
Updated my original comment - had to refresh my physics knowledge a bit. This sounds good, but wouldn't the max speed still be kind of artificial ? Agree on that - the less resistance put on the engine's crankshaft, the better its performance. How about specifying a max load the engine can pull instead ? |
This comment has been minimized.
This comment has been minimized.
|
Should probably be Min(engines_pull, wheels_traction) |
This comment has been minimized.
This comment has been minimized.
That's a mathematician's answer. |
This comment has been minimized.
This comment has been minimized.
|
I'm not opposed to this, but it's going to significantly alter vehicle-users' game. As I said in the roller PR, this should get some discussion (please feel free to post those equations) and likely will wait for 0.B stable to land. Aiming, stamina, etc are also on hold. A forum link wouldn't be amiss. |
This comment has been minimized.
This comment has been minimized.
|
"That's a mathematician's answer. Your current safe speed is calculated by this monster of a formula (scroll down if not interested): int vehicle::safe_velocity (bool fueled) Essentially, it's a safe speed = (function of engine power) * k_mass_factor * k_dynamics_factor. In short, the fix takes the difference between 100 and your current k_mass and multiplies it by eight, lowering your k_mass. So, for a current k_mass of 99% ( = 100 - 1%), my fix will make it into 92 % (= 100 - 8%), so you lose at most ~7% of the vehicle's speed. This can be averted by adding more wheels (greater wheel area leads to lower k_dynamics, however) or making the truck lighter. How to deal with it ? 1) Add more wheels (or larger wheels) - this increases you k_mass, but may lower your k_dynamics or 2) Make the truck lighter. The existing formula ( float km = ma0 / (ma0 + (total_mass() / 8) / (8 * (float) wa)); ) ties down the sensible weight of the vehicle (total_mass) to wheel area (wa) . This however is set so high, that by sacrificing some k_dynamics to give yourself some wheels (not many - 4 armored wheels are sufficient for this to work), you can build as heavy a truck as you desire, without losing any noticeable amounts of safe speed (the roller is an extreme case - with that much wheel area, I could make it weigh some 500 tonnes and still be able to run at 100+ km/h). Seeing such an effect, I've lowered the weight-per-wheel-area ratio - the question is one of numbers - whether this is too much / too little or just fine. |
This comment has been minimized.
This comment has been minimized.
|
KA101: If we can do an overhaul of the speed system, I would be all for it - let me get some beauty sleep and I'll be on the formulas first thing tomorrow. Question: What units is the engine power given in ? HP ? kW ? |
This comment has been minimized.
This comment has been minimized.
|
That's some great stuff here, Aenye! I always wondered at those really high top speeds... |
This comment has been minimized.
This comment has been minimized.
|
Thanks ! You guys motivated me to work a bit more on this issue, so I've forum-ised a few quick ideas for what could be tweaked in the current system: http://smf.cataclysmdda.com/index.php?topic=7877.0 |
KA101
added
the
(S2 - Confirmed)
label
Sep 24, 2014
This comment has been minimized.
This comment has been minimized.
|
Speeeaking of things. APCs currently have V6 engine (which REALLY ought to get changed to diesel six-cylinder as soon as it lands) and safe speed of 23, acceleration of 2 km/h/t and mass of ~2500 kg. Question! What's 'apc' vehicle's safe speed and acceleration in your version of the formula? P.S. I'm not complaining about current speed, the vehicle configuration for APC is awful enough already to make driving it without at least cutting off some boards nearly-impossible if you don't want to drive into a tree or a river. |
This comment has been minimized.
This comment has been minimized.
|
Whenever someone codes it, Barhandar. >_< |
This comment has been minimized.
This comment has been minimized.
|
Well, the IRL speed of the APC results from its diesel engine being able to produce ungodly amounts of torque ...at low RPMs - the inverse being true for sports cars which need little torque (light construction) but high RPMs. In transit now, so I can't give you 100% values, but: Now, if we used the APC chassis and general shape, but loaded it up with a lot of stuff (exchange seats for cargo holds for example and stuff them full), so that it would weigh 25 tonnes, the K mass in my version goes (estimation here - sorry) down to some 50-60% and the safe speed to 12-14 km/h, while in the current version, the K mass would only drop to some 92-95%, keeping the safe speed at 21+ km/h. Neither system is very 'realistic' (remembering to maintain the fun when pursuing realism, of course), hence, my forum post on tweaking the whole system some more :3 |
Aenye
changed the title
Increases effect of mass on vehicle speed [CR]
Increases effect of mass on vehicle speed
Oct 1, 2014
KA101
self-assigned this
Oct 3, 2014
This comment has been minimized.
This comment has been minimized.
|
Vehicle folks seem to like this, so let's make it happen! |
Aenye commentedSep 23, 2014
Was doing testing for a road roller (uses ten roller drums for wheels) - experimented on a roller I've found (51' rollers, so wheel bigness was a constant, done on v12 engine), I was changing width (w) and mass (m) of the roller drum, while jotting down the safe/maximum speed (sp) that was attainable:
w=200, m=750 kg -> sp 33/1239
w=200, m=1500 kg -> sp 33/1239
w=200, m=15000 kg -> sp 33/1239
w=60, m=750 kg -> sp 95/1239
w=60, m=1500 kg -> sp 95/1239
w=60, m=15000 kg -> sp 94/1239
w=60, m=1 g -> sp 95/1239
w=20, m=750 kg -> sp 197/1239
w=20, m=1500 kg -> sp 197/1239
w=20, m=15000 kg -> sp 189/1239
While a v12 engine is powerful, being able to blast a roller weighing 150 000 000 grams (10*15 000kg in the most extreme case) at 189 km/h safely is a bit too much. That and the fact, that increasing total vehicle mass by a factor of ten lowered the safe speed by 8 km/h (4%).