racer home



Home Give it some wings.

Dolphinity Organiser - free planning, project management and organizing software for all your action lists


This page describes Racer's gearbox (in a car.ini file). A more geneal look on all car.ini physics variables can be found here.

Gearbox ratios

You can specify the gearbox workings in the gearbox section.

Gearbox shifting

Stored in the engine subtree, shifting can be done manually or automatically. Mostly (without freeshifting) what happens is a 3-phase process; declutch (time_to_declutch), a moment in neutral (time_in_neutral) and lastly the clutch engages again with the new gear set (time_to_clutch). Note a separate set can be specified (v0.5.2b7.5+) for downshifting, which in conjuction with blip_throttle (see racer.ini).

These parameters define shifting:

Racer (from v0.5) can do freeshifting, so the user can attempt to put the car in a certain gear at any time. More parameters will deal with bad shifts later.

Automatic transmission

Racer supports automatic transmissions. A simple method is to define a shift-up and shift-down rpm:

A more complex but better method (v0.9.0 RC4+) involves creating curves to decide when to upshift, and when to downsihft more specifically. This also allows features such as kick-down.

To show how these shift curves work, take a look at the image below. It contains a curve to shift from gear 1 to 2. A mirror curve is also shown that defines when the gearbox should go back from gear 2 to 1.

Horizontally there is throttle (0..1), and vertically there is velocity (in meters per second). The general characteristic should become clear from this; when not using a lot of throttle, gears will change sooner (at a lower velocity) than when using a lot of throttle.In this graph, when applying 100% throttle, only at speed ~24 m/s (~86 km/h) will the car shift onwards to the second gear.

Note that the 2nd curve shown (in light red) is the automatic_gear2_1.crv (specifying when to go back from 2nd to 1st gear). It is lower than the automatic_gear1_2.crv, so only when velocity gets really lower, the car will shift down. It will take a bit of time to get all these curves to act together; the automatic_gear2_3.crv should be higher than the automatic_gear1_2.crv. Otherwise the car would try and shift down back and forth quickly.

automatic gearbox curve




The clutch is the part that splits the driveline into 2 parts; the preclutch part (the engine itself) and the postclutch part (driveshaft plus differentials and wheels). The parameters are:


The handbrakes can be applied to any and all wheels. The wheels that are affected are set in handbrakes.wheels. Set it to "23" for example and the handbrakes will work on wheel2 and wheel3 (see image). Mostly these are the 2 rear wheels, which should correspond to "23".

Then, for every wheel, define the maximum handbrake torque in wheel<x>.max_handbrake_torque. If not defined, the value of wheel<x>.max_braking is used, but that generally is too high. Theoretically, a handbrake will generate approximately 10% of what the normals brakes can generate.

Note that the combined effect of pedal braking and handbrakes will never exceed the max_braking torque. So they are added, but clipped at max_braking.

Gear warning sounds

A warning sound can be defined for indicate the driver must shift. The sound will trigger as a certain rpm is hit. The following parameters can be set:

The sound played is defined in audio.warn_rpm.sample; more information can be found at the car sounds page.

An example extract from the car.ini is shown below (for a definition of warning sounds). Here, all warning sounds use the same template, so all trigger at the same rpm.

; Optional warning sound as rpm gets high
; Gear ratios; note that negative gears are reverse gears
; There must be 1 reverse gear; the rest is forward
} ... }

Dolphinity Organiser - free planning, project management and organizing software for all your action lists

(last updated May 30, 2013 )