CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
9.95k stars 4.08k forks source link

3 wheeled cars? #11832

Closed FredZeppelin closed 7 years ago

FredZeppelin commented 9 years ago

It seems weird that you can still drive a car that only has three wheels. I've never tried it in real life, but I don't think it would work out very well...

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Shoes01 commented 9 years ago

This might be more of a "it's more fun this way" decision. Either that or a "you're now driving on rims" situation: you really shouldn't, but you can.

deathnutts commented 9 years ago

actually there is a lot of 3 wheeled vehicles in real life and thy work vary well as long as the wheels are in a triangle like one in front and two in back

Headjack commented 9 years ago

Yeah it's like a tricycle. I think Japan used to make pickup trucks like that. If bi-wheelers work then tri-wheelers are the same but more stable.

Ideally the wheels are in a formation like . ' . rather than : . so maybe you're sating that normal cars with one wheel out should be hampered? that makes sense, cause driving a regular 4 wheeler on three is tough due to balance.

FredZeppelin commented 9 years ago

Yeah, I meant a regular 4-wheel car. If the wheel was gone, the quadrant without the wheel would just hit the ground and it'd be undriveable. Anyway, there seems to be no consequence to losing a wheel. The car I'm driving right now in game has a max safe speed of 67 with only 3 wheels!

KA101 commented 9 years ago

So far as I know it's more a code issue with the way we calculate veh balance. There's at least one PR in the works on the issue, though.

sparr commented 9 years ago

11687 has explanation of current behavior based on wheel bounding box and a proposed improvement with calculating a convex hull. That would solve the problem if you pretend cars have no suspension.

drbig commented 9 years ago

Although (and to show my general point that milspec stuff should usually be superior to everything else):

Cougar H

Cougar hit with mine and driven at 20 mph by crew back to safe area on three tires and a rim. Crew sustained mild concussions.

Source

sparr commented 9 years ago

To elaborate on my "no suspension" previously...

When a car loses a wheel, the hub/axle on that side is going to go down a certain amount as the suspension on that corner and the opposite corner both extend . By itself, that might not be enough to hit the ground in a lightly loaded vehicle.

Then if the center of mass of the vehicle is closer to that wheel than to the diagonally opposite wheel, the vehicle is going to simply tip the rest of the way over, with the opposite wheel coming off the ground while the missing wheel's hub hits the ground. Additionally, any centripetal force will exacerbate this problem, so a vehicle that didn't ground out originally will do so if it turns away from the missing wheel.

So, yeah, there's a lot of more detailed simulation we can do here, for handling and roadworthiness and leaving-ruts-in-the-ground, if someone cares to implement all the math. There's probably a happy medium between not enough and too much realism here, in terms of player understanding and enjoyment. We're probably already pretty close to that ideal point, but I'm in favor of moving at least slightly further towards realism (see convex hull comment and link above).

kevingranade commented 9 years ago

A simple change that would wreck the 3 wheeled cars is if we shift center of mass based on acceleration, even making the center of mass move one square closer to the missing wheel would put it in a bad configuration if we're using a convex hull around the remaining wheels. (Assuming it has a standard layout where the CoM is directly between the wheels)

sparr commented 9 years ago

convex hull + shifting CoM with acceleration would be a very good approach.

convex hull will penalize or ground front-heavy vehicles that lose a front wheel, or rear-heavy vehicles that lose a rear wheel. shifting CoM with acceleration will ground out vehicles that lose a rear wheel (accelerating) or a front wheel (decelerating).

on a related note, I think we already have some math for wheel ground contact area for skidding purposes. we should probably do that for acceleration (spinning out) and deceleration (skid stop) if we don't already. even if we assume every vehicle is 4WD there would still be a loss of traction with one fewer wheel.

kevingranade commented 7 years ago

Closed for vagueness and staleness.