Check out my library for some decent, realistic top-down car physics (3rd demo in):
http://quickb2.dougkoellmer.com/bin/qb2DemoReel.swfThe source code can be found here:
http://code.google.com/p/quickb2/If you're patient enough you can just extract the source code and adapt it to work with Box2D directly. I'd appreciate feedback on QuickB2 though of course
🙂(the following is taken from another post I made...)
Cars are defined by the following properties:
gear ratios and number of gears.
torque curves (engine performance graphs that determine torque output at a particular RPM).
differentials
center of mass in the z direction (x/y center of mass is implied from the car body's geometry).
arbitrary tire placement and number of tires.
tire friction, including rolling friction.
tire mass, width, and radius.
whether a given tire turns and/or brakes and/or is driven
turn angle.
shift timings.
manual or automatic transmissions.
transmission efficiency.
traction control (sets whether or not you can do burn-outs and such).
It takes into account most things you'd expect from a car simulation, like weight transfer, tire spin, handbrake turns, etc. The braking and friction model isn't insanely realistic, but close enough for most purposes. You should be able to put in real-life car properties and get a reasonable facsimile. AI is modular and hot-swappable. You give a car a brain, and that brain sets "data ports" on the car that determine percentage of throttle, turn and brake each time step. The brain in turn is controlled either by player input, or by AI routines (path-finding, path-following, etc.).