CleverRaven / Cataclysm-DDA

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

Vehicles losing cruise control after hitting small bushes #2831

Closed raindropworks closed 10 years ago

raindropworks commented 11 years ago

This is pretty recent, so I don't know if it was planned or not. I picked up a pickup truck with a bit of gas, managed to mow through a bunch of Fungoids and Fungal Zombies with no problem, but then I hit a bush (first time at 30 mph, then again at 10 mph) and both times it kicks me out of cruise control.

Bug or feature? First noticed in #2815

lupinetine commented 11 years ago

Vehicles in general just seem particularly fragile in this build. Just driving over a field destroys or damages half the components in any vehicle.

raindropworks commented 11 years ago

@lupinetine Not to mention brushing a wall destroying several solar panels. Should that be it's own bug report?

fuchs87 commented 11 years ago

@minakitty: It´s more a feature than a bug, though there could be more differentiation in this aspect between walls and fences/bushes.

ianestrachan commented 11 years ago

I had this happen too, I suspect it's something to do with #2654.

kenoxite commented 11 years ago

Just another "Me too" post. I currently have my RV stuck because of this (a bush behind the front wheel).

This is probably similar to the vehicle part from https://github.com/CleverRaven/Cataclysm-DDA/issues/2703 (a low velocity collision against a crate will kill you).

raindropworks commented 11 years ago

@kenoxite I seem to remember backing into a wall (RV's have no rear windows) at my normal 10 mph and getting thrown out of the seat belt, through the board tile separating the cab from the cabin, and going back two more tiles to hit the ground. I think I came short of hitting my head on the kitchen.

fuchs87 commented 11 years ago

I implemented this new vehicle collisions. I think I have to explain some points: If you drive into a bush mainly 2 things can happen: a) the bush is smashed: This means the bush disappears und you can drive over. b) the bush resists: Your vehicle stops and the cruise control is disabled. This happens if the damage done to the bush is too low. If you want the bush smashed, drive faster or take a larger car. Damage increases with higher velocity and higher weight. That´s intended .... roads are senseless if you can drive through fields without hesitation.

kevingranade commented 11 years ago

This is mitigated by my PR #2787 by scaling up the effective weight of larger vehicles. In my testing it massively reduced the frequency of collisions having unexpected effects. Ideally people can play with the scaling factor if the one I chose still has issues.

kenoxite commented 11 years ago

drive faster or take a larger car

You mean bigger than an RV? That would only leave us with Semi Trucks and buses. And probably those wouldn't be big enough either.

This is mitigated by my PR #2787 by scaling up the effective weight of larger vehicles

Good to hear that.

Some balance is needed between punishing driving crossroads (which I agree with) and transforming bushes into some kind of vegetable land mines.

fuchs87 commented 11 years ago

@kenoxite: It wasn´t a problem in my games to smash bushes with a normal car. (50 mph should be enough). The damage done to the steel frame was around 11, which I think isn´t too much. If you stuck in some bushes, try to go reverse. If this doesn´t help, smash the obstacles manually.

raindropworks commented 11 years ago

@fuchs87 A 1425 kg RV with wide tires moving at 16 kph (10 mph on my cruise control)can be stopped by a bush that a person can walk through at a third speed? Part of the reason I drive at slow speeds in these 'tank' vehicles is because it's dangerous to go at any speed down city streets, laden with hulks of cars that can't be pushed out of the way with any ease. PR #2787 does seem to make a lot of inroads to addressing the issue, especially with the potential creation of Zombie Dreadnought (reference picture included) that will be huge, prohibitively heavy, but armored to the hilt, and throwing enough kinetic force to push any vehicle out of the way (instead of the current standby of hack-sawing every car you see into little bits)

But that's just my three cents. I expect change =^_^=

zombiebus (Now really, tell me you can't picture that in DDA)

lupinetine commented 11 years ago

@fuchs87 It feels like this has gone too far to the punishing side for driving cross-country. I agree that roads should be the preference over fields, but driving my steel and spike plated truck over an open field shouldn't result in needing to re-weld the frame after every map tile. I mean I can take my economy car mudriding or plow it through an overgrown field without needing anything more than a carwash and maybe a touch of bondo if I hit a 5 foot bush or very young tree, irl.

raindropworks commented 11 years ago

@lupinetine On an (slightly) unrelated note, did you know there's a welding rig you can install in your truck now? Gives you a welder and soldering bench that runs off storage batteries.

lupinetine commented 11 years ago

@minakitty Whaaaat? Oh man, I was done with this build but I'm totally going back in to try that! Thanks!

kenoxite commented 11 years ago

@fuchs87 The problem right now with getting stuck in bushes is the same you already encountered and one you might be aware of when riding motor/bikes off-road. With those vehicles there's always been a high chance of getting stuck for good if you hit a bush. And that's actually what's happening right now with any vehicle. Take my RV as an example. Whenever I move in any direction it makes the vehicle halt for good (vehicle stopped, cruise control disengaged). As soon as you start the engine and move either forward or backwards the bush is touched, as it's under the vehicle, and you're back to step 1. Not to mention that the bush, being right under the chassis, front right wheel, is hidden, so there's no way to (s)mash it) to free the vehicle.

About balancing driving off-roads, just an idea which I'm not sure if it's implemented (haven't noticed anyway): maybe make driving off-road slower by default? Say, you can only go up to about 80/90% of top speed? That assumes no default car is kitted with proper off-road suspension and traction (which AFAIK is already the case - except maybe quads). Alternatively or additionally, increase the gas/whatever power consumption when off-road, to simulate the extra strain on the engine to keep up with the desired speed in such uneven terrain. Finally, increase wear damage to wheels when not in a road (real life normal wheels wouldn't last too long in this scenario anyway).

fuchs87 commented 11 years ago

I think shrubs can stop a car. :P http://www.cambridge-news.co.uk/News/UPDATE-Man-seriously-hurt-as-car-crashes-in-garden-18022013.htm

@kenoxite: A bush under a carpart should be very unlikely after a collision, because your vehicle stops instantly if you hit a bush that is not smashed. This never happened in my testgames and I can´t reconstruct it. Could be a bug, but I need more information.

kevingranade commented 11 years ago

A row of shrubs the width of the car sure... just one shrub seems a bit unlikely.

lupinetine commented 11 years ago

@fuchs87 That article is pretty clear he hit fencing and shrubbery. Like it mentions it in the first paragraph.

kevingranade commented 11 years ago

Are you aware that destroying a "shrub" results in an "underbrush"? That's probably what's happening here. Hitting the "shrub" destroys it and slows the vehicle, then hitting the "underbrush" stops the vehicle.

kenoxite commented 11 years ago

Here's the savegame for you guys to try out by yourselves, version 0.7.1-1475-g34dde33. Just enter the RV (BTW there's some aggroed critters around) and try to get it unstuck. A bush just next to the road and behind the front left wheel, which you can only detect by (e)xamining that area, is the only thing blocking this vehicle.

fuchs87 commented 11 years ago

@kevingranade: Shrubs are in the category "veh_coll_thin_obstacle". That means they just disappear after destroying. I think it has something to do with multiple collisions in one turn.

@all: Shrubs are currently in the same category as fences and some other stuff. The current implementation is a compromise between this obstacles. If you think fences are balanced, we need more differentiation.

raindropworks commented 11 years ago

Have another example here. i was ambushed by a wolf spider when i was already weakened from overencumberance, and my str/dex ended up at 0, in other words, i can't attack. So i find my pickup from the Fungoid Escape and go to attack the spider with it. The resulting 'crash' of me hitting it at about 20-30 mph killed me. Killed the spider, too, but according to the logs, it was the impact with the spider that crashed the truck.

screenshot from 2013-09-04 01 54 37

fuchs87 commented 11 years ago

"throw from the seat" is coupled to the player´s strenght. You get a bonus from the seatbelt, too. It makes sense, to prevent "throw from the seat" in any case when there´s a seatbelt. I will write a PR soon.

kevingranade commented 11 years ago

Something I noticed in the code is that throw from seat seemed to use vehivle velocity instead of impact impulse, shouldn't it be the other way around? On Sep 4, 2013 5:50 AM, "fuchs87" notifications@github.com wrote:

"throw from the seat" is coupled to the player´s strenght. You get a bonus from the seatbelt, too. It makes sense, to prevent "throw from the seat" in any case when there´s a seatbelt. I will write a PR soon.

— Reply to this email directly or view it on GitHubhttps://github.com/CleverRaven/Cataclysm-DDA/issues/2831#issuecomment-23780625 .

fuchs87 commented 11 years ago

@kevingranade: It uses "d_vel" (delta velocity) which is the difference between the velocity before the collision and the velocity after the collision. Makes sense imho. There are mainly 2 reasons, why "throw from seat" happens so often: a) If a bush (or any thin_obstacle) isn´t smashed, the car stops instantly which causes a high delta velocity b) Seatbelts have no effect (I will change that)

raindropworks commented 11 years ago

How much of this relates to my spider/me double suicide? Those who enjoy mowing down zombies with their cars may have a broken game right now.

lupinetine commented 11 years ago

@minakitty I'm in the same boat. After repairing a car I hit one wolf and one normal zombie and it was goodnight gracie.
Maybe it should be a new bug report? It seems to be a larger issue than just shrubs.

raindropworks commented 11 years ago

Not necessary a new bug report, but an expansion of what I originally posted. If I'm reading correctly it seems to be an issue with anything in a certain category of collision. Putting shrubs and spiders and wolves in the same boat seems to make this all one bug

fuchs87 commented 11 years ago

I fix it in this PR: https://github.com/CleverRaven/Cataclysm-DDA/pull/2852

raindropworks commented 11 years ago

thanks. i'll test it when i find a working vehicle

raindropworks commented 11 years ago

My Cata broke ... details on the PR page

raindropworks commented 11 years ago

Still waiting for a working vehicle. The PR triggered an error that I think was save file related, so I had to start a new world.

fuchs87 commented 11 years ago

If you just want to test vehicles, you can use the debug system. ;) http://www.wiki.cataclysmdda.com/index.php?title=Cheating

raindropworks commented 11 years ago

@fuchs87 i know, and i may do that, i've just been trying to play 'legit'. i do have the debug mapped to Z if i ever need it. Now if they put a 'heal player' in there, i'd be more likely to use that ...

kevingranade commented 10 years ago

The behavior of kicking the vehicle out of cruise control when an obstacle doesn't break has been addressed.