Skip to content

Drag

The speed a levitating unit sheds each frame while it is coasting.

Specification
Applies to
levitation controls
File
rules.ini
Section
[LEVITATION]
Value
floating point
When omitted
0.05

A levitating unit travels in bursts: it thrusts for a fixed number of frames, coasts, brakes to a stop, and thrusts again. This figure is the loss applied on every frame of that cycle except the braking one, where IntentionalDeacceleration takes over, and the drifting ones, where no loss is applied at all. It is subtracted from the unit’s speed rather than scaling it, so the slowdown is a steady one and not a curve that tails off.

Once the loss is as large as the speed the unit is carrying, its motion is zeroed on the spot rather than reversed. A figure at or above the speed a thrust reaches therefore leaves the unit stationary between thrusts.

Speeds and losses in this section are in leptons per frame — 256 leptons to a cell, 15 frames to the second. A unit coasting at four leptons per frame comes to rest in eighty frames at a loss of a twentieth per frame, and in eight frames at a loss of a half.

rules.ini
[LEVITATION]
Drag=0.1
MaxVelocityWhenHappy=5.0
[MYFLOATER] ; a UnitType registered in [VehicleTypes]
Locomotor={3DC0B295-6546-11D3-80B0-00902792494C} ; the levitation drive

The section governs only objects whose Locomotor is that identifier. Its values are held once for the whole game rather than per object, so a change to any of them moves every levitating object at once.

The whole section is read only from a file that also carries a [General] section: the read is made from inside the routine that handles [General], and that routine returns without doing anything when the file has no such section. A map overriding any [LEVITATION] value must therefore carry a [General] section of its own, holding at least one assignment — a section with no entries in it is discarded as the file is read.