What it does
Each track is a lap of road-data laid in 3D, with a ground plane under the deck, ramps that act as kickers and
upright walls as barriers. Every kart is a vehicle-handling vehicle, with its LOW and HIGH gearbox, crests, landings
and bank, and the player's is driven from the input with a gear lever. Karts fly off sharp crests and kickers,
fall off any edge without a barrier, land on the ground and are put back on the road after a moment. Rear hits trade
speed, side hits knock karts apart and can spin them, and solid roadside things bounce them back.
The rivals have a driver of their own: a pace set by each racer's skill and the difficulty, a racing line across a share of the road, braking for bends at a share of the kart's own corner speed, passing on the side with room, easing off when boxed in, and an optional catch-up around the player. You can cap how hard they work the pedals, for a field that launches slowly or brakes late. The same driver can take the player's wheel for an attract demo.
Around the racing sit the countdown lights, laps and places, the finish with a prize by place and a time bonus, the
qualifying place for the next track, game over, the extra stage after a clean sweep and a distance score. scene()
hands road-view-pseudo3d the track and the focus for its rolling chase camera, which turns the whole picture with
the steering and the bank. It runs at a fixed sixtieth of a second, seeded, and snapshots and restores.
Features
- Elevated circuits — closed laps that climb, bank, dive and cross themselves, standing over a ground plane on support towers.
- Jumps and falls — karts take off from crests and kickers, and fall off unguarded edges to be put back on the road.
- A full field — rival drivers with skill, a racing line, braking for bends, passing, catch-up and optional pedal limits.
- Contact — rear bumps, side knocks, spins and bounces off solid roadside things.
- Race structure — a grid, start lights, laps, places, a final-lap call and a finish with results.
- Qualifying and courses — courses of tracks raced in order, a place to qualify, and an extra stage in another machine after winning them all.
- Scoring — points by distance, a prize by place, a time bonus under a pace, and optional points for places gained.
- A rolling chase view — the track and camera focus for the pseudo-3D ribbon view.
- Three difficulties — rival pace and catch-up, and the player's handling assist, for Easy, Normal and Arcade.
Good for
- Elevated kart racers on roller-coaster tracks with jumps and sheer drops, in the style of Power Drift.
- Sky or space circuits of floating decks, with barriers wherever you want them.
- Toy-track stunt racers with short laps, kickers and a single rival.
- Time trials on one elevated loop, with a field of one and the first place to go on.
- Arcade cups where a top-three finish takes you to the next track and a sweep earns a bonus stage.
Make it yours
The SkyCircuitConfig holds the courses and their tracks, the start track, laps, the racers and the player, the
qualifying place, the vehicle, the assist, kart size and the grid. The rivals' section sets cruise pace by skill and
difficulty, the share of corner speed they brake to, how far ahead they read the road, catch-up, the racing line,
weave, gap and the optional acceleration and braking caps. Contact, falls (time, restart speed, and whether the kart
is put back on the centre line or its own side), scoring, finish time, the extra stage's trigger, track, laps and
vehicle, and the shadow size are all fields, and validate refuses any setting it does not recognise.
powerDriftPreset takes a course, difficulty, seed and player: five courses of five tracks, twelve racers, four laps,
the player fifth on a two-abreast grid, third or better to go on, and an extra stage in a jet or on a motorbike after
five wins. cloudCupPreset is an original, different game: one cup of three circuits floating over clouds with
barriers on every edge, six racers, three laps, the player last on a three-abreast grid, no catch-up, only a win goes
on, and a floaty kart with low air gravity.
A quick look
A race from the preset, stepped with the pedals and gear lever and drawn by the ribbon view:
const SC = game.skyCircuit, RV = game.roadViewPseudo3d;
const race = SC.createSkyRace(SC.powerDriftPreset({ course: "a", difficulty: "normal" }));
const view = RV.createRibbon({ width: 320, height: 224, scale: 3, style: "canyon", styles, sprites });
const chase = new RV.RibbonChase(RV.RIBBON_CAMERAS["power-drift"]);
race.start();
game.step("race", (dt) => {
race.tick(dt, { throttle, brake, steer, gear: lever }); // gear: 0 LOW, 1 HIGH
const sc = race.scene();
view.draw({ ribbon: sc.ribbon, field: sc.field, style: sc.style ?? "canyon", camera: chase.update(sc.ribbon, sc.focus, dt) });
});
Works with
road-data— required: each track is a road file laid as a closed lap.vehicle-handling— required: every kart's gearbox, jumps, landings, bank and falls.scaled-depth— required: one field for the scenery, support towers, karts and shadows.road-view-pseudo3d— draws the track and gives the rolling chase camera.road-racerorroad-pursuit— for a road that runs on rather than laps.track-racer— for top-down circuits;offroad-coursefor off-road legs with flags and gates.
Good to know
- The preset's track layouts are drawn from course maps and recordings, not original data, and the rivals' driving, the score formula and the extra stages' layouts are estimates.
- Rivals never fall and do not hit roadside things; only the player's kart does.
- The extra stage's machine is drawn differently but handles like the kart.
- Course and driver select screens, intros, continues and name entry are left to your game.






