A checkpoint, in this API, is a split at a fixed fraction of a lap's length along the route. Split/Second has no checkpoints inside a lap: each shipped track has exactly one, the start line, and the "checkpoint" and "sector" the HUD refers to are jump-scoring bonuses rather than timing points. What the game does track exactly, for every car, is its distance along the route, so that is what the checkpoints are built on.

Splits#

ss.race.splits is the number of checkpoints per lap, 4 by default; assigning 1 to 64 changes it. n splits put n - 1 checkpoints at equal fractions of the lap's length, and the line itself is the n-th, reported by lap_time rather than checkpoint. The checkpoint event runs when a car's fraction of the lap first passes k / n on that lap, once per checkpoint per lap, with the running lap time as the split (lap_time) and the time since the previous checkpoint or the line as sector.

A car that reverses keeps the checkpoint it had; a respawn that moves the car forward receives each skipped checkpoint in turn. Only laps that count produce checkpoints: not lap -1 before the line, and not the cool-down lap after the last one, where the lap timer sits at 0 (in a dev-boot race the AIs keep driving laps 3 and 4 and never finish, which is the case this rule covers).

The crossing is sampled on the frame the car passes the fraction, so a split is accurate to one frame, about 17 ms at 60 Hz. The line's own time, the time of lap_time, is the game's exact figure. Splits are useful for sector timing, ghost comparisons and pace displays.

NOTE: splits is one setting shared by every mod in the game, not kept per mod. A mod that changes it should read ev.splits from each event rather than assume its own number, and a mod that only listens should expect any value from 1 to 64.
ss.race.splits = 3                          -- two checkpoints a lap, at a third and two thirds

ss.on("checkpoint", function(ev)
  if ev.is_local then
    ss.log("lap %d, split %d/%d: %.2f s (sector %.2f s)", ev.lap, ev.checkpoint, ev.splits, ev.lap_time, ev.sector)
  end
end)

Lap times#

The lap_time event runs when the Laps component closes a lap, for every car. lap is the lap just completed (1-based), laps the race's count, time the lap's exact start-to-end on the race clock, race_time the clock at the crossing, and best and is_best the best-lap record once it is valid. The player carries the same figures live: player.lap_time is the running lap time, player.last_lap and player.best_lap the records, player.race_time the HUD timer, and player.checkpoint the last split reached on the current lap (0 until the first).

In a Race and in Detonator these records are the race clock and the laps. In the other modes the Laps component is set up by the mode's own params and the figures have not been mapped yet (?): an Elimination run reported the AIs' best laps at around 14 s, which is not a lap time. Lap and race times from those modes should be treated as unverified until the mapping is done.