Legacy:New drivelines

Drivelines are used mainly to show to the AI where to drive, but also to determine the order of karts: if a kart is on the driveline, it is known how much of the track it has driven, and allows to compare the progress of karts. If a kart is off the driveline, the closest driveline point is picked to determine how far that kart has driven.

There are two components used to describe the possible ways to use:

Quads

All places that a kart is allowed to drive on are marked by quads. Each quad has internally a unique number. Quads need not to be connected (though usually are).

QuadGraph

A graph is then defined using the quads. The graph consists of nodes - as a default, each quad corresponds to a graph node with the same number, but this is not necessary. E.g. part of the track might not be used for a particular race (think of a city track where several different race tracks can be defined), or some quads might be used more than once (e.g. a figure 8 race track: the quad in the 'intersection' would be used twice)


The graph defines for each graph node which quad it belongs to, and which are the possible successors. Usually each quad will have exactly one successor, but in case of a shortcut or branch of the track it might have more than one.

Example:

How to create drivelines with the track exporter

How to convert old drivelines to the new format The old driveline format used two meshes - one for the left side, and one for the right side. To convert these to the new format: 1) For each of the two drivelines remove the edge that crosses the starting line. So instead of having a loop you have two lines, each line having a starting point and an ending point indicating the direction in which the karts are driving. 2) combine the two meshes into a single mesh. 3) Create a new edge connecting the two starting points. 4) Create a new edge connecting the two ending points. 5) Select the two starting vertices, extrude them (vertices only) See picture: Add the game logic property 'type', and set it to 'main-driveline'