## RE: [Algorithms] Car engine behaviour

 RE: [Algorithms] Car engine behaviour From: Madoc Evans - 2006-04-27 10:12:04 ```Hey guys, Thanks for all the replies (except for Tom's 'cos he's just bragging about his cars - another Brit boy racer :)). Damn, I've always wanted a skyline. So, most of the replies talk about advanced considerations that I would likely experiment with once I've got the basics in place. For the time being my problem is more basic. This isn't to say your replies were not useful, they have clarified a number of things and are great help. I'm at the prototyping stage for a game that still has a lot of development ahead of it. It is not a racing game, and as such I don't believe it will be subject to quite so much scrutiny but we want stats like HP and so on that reflect in the behaviour of the vehicle so that someone who knows his stuff won't say "this is c**p". I don't know if my original post did a very good job of explaining what my current setup is. No one has commented but I'm still inclined to think that my basic wheel-engine feedback setup is good. From what I can tell, it's pretty much exactly what Jon described without the RPM-dependant torque (which Tom seems to suggest that it could be mostly negligeable). The unfortunate result of it however is that high gears are not really much worse at accellerating from a stand- still than low gears, and in fact the feed-back from the wheels acts more as break limiting top-speed rather than accelleration. I can see that this might be a result of drag at higher velocities resulting in a greater shift in velocity at each integration step. Out of my ignorance, I'm thinking that this could be the lack of consideration of the vehicle's mass and momentum. Something along the lines of: accellerating a mass from 4 to 5 kph takes far more torque than accellerating it from 40 to 41 (bare with me for the simplication). But this isn't coming into play anywhere. When calculating wheel-engine feedback, I only consider the difference in velocity between what the engine revs "want" and what the actual wheel velocity is, and this difference tends to be greater at higher velocities. So, to narrow my most immediate problem down: How should I describe the fact that higher gears will have a harder time at accellerating at lower velocities while they fair pretty well at higher velocities? I get the idea that this is simple dynamics and I'm just being dumb by not just working it out but I don't feel confident with basing it on my own assumptions. I'll have too look at some dyno charts and see if I can generate some suitable curves or get away with some constants. I won't be simulating any real-world models and the vehicles will be subject to a lot of (probably unpredicted) variation. As for traction, I'm thinking the problem is similar to static vs dynamic friction which so far I've only confronted in terms of hard thresholding and contact forces which I guess isn't very suitable for this kind of simulation. From my experience with wheel spins and hard braking it seems almost right but hard thresholding is usually evil... Thanks again, Madoc ```