surfaces.module
README.md
surfaces
The six track surfaces: asphalt, dirt, ice, neon, offroad and water. Each one is a look (road material, edge trim, barrier style, bumps, a water sheet for the channel) and a feel: a physics ground surface the kart's wheels grip with, so ice really slides and dirt really drifts for players and AI alike, with no per-wheel script. RaceTrack and build read it to build the road; api, the gallery and the HUD read labels and tints from it.
| surface | grip | edge | barriers |
|---|---|---|---|
| asphalt | 1.0 | red and white kerbs | tyre walls |
| dirt | 0.62 | dry grass verge | hay bales |
| ice | 0.16 | packed snow rim | snow banks |
| neon | 0.95 | glowing rainbow trim | glowing rails |
| offroad | 0.55 | gravel, bumpy road | rock walls |
| water | 0.5 | concrete lip, water sheet | channel walls |
Functions
names(): surface names in gallery order (alsoORDER).get(name): one surface definition (label,blurb,grip,rolling,physics,material,edge,edgeStyle,barrier,barrierLabel,bumps,water,sky,tint), or nil.resolve(name?): the surface forname, or asphalt for an unknown one.list(): every definition in order.define(): registers every surface (plusracingKit.oilandracingKit.barrier) as a physics ground surface on this peer; idempotent, RaceTrack calls it.