A car launch and upgrade game. The car speeds down a launch hill on its own; you tap Jump at the yellow stripe on the kicker (a perfect tap adds 18 % to the launch, a good one 8 %, an early one costs 6 %), then tilt and fire nitro in the air, land on your wheels and roll on over the hills until the car stops. Coins from every run buy upgrades and cars, so each run goes further. Eight zones (Meadow, Canyon, Harbour, Snowfield, Volcano, Cloud Coast, Stratos, Orbit Gate) lie between the hill and a finish line 20 km out, and each zone starts with a wall you must fly over, taller every time.
How it's built
- Rules apart from drawing.
core/ is plain TypeScript with no Phaser import: the track (world.ts), the run simulation stepped at a fixed 60 Hz (run.ts), the economy (economy.ts), the player's profile and every daily system (profile.ts) and a driver bot (pilot.ts). Time is passed in, so the daily systems are tested without a clock. - The track. The launch hill is a smoothstep descent joined to a parabolic kicker whose lip angle follows the Ramp upgrade. The ground after it is a sum of three sines with an amplitude that grows per zone, so its slope and curvature are smooth everywhere: landings compare the car's angle with the exact slope, and the car leaves the ground over a crest when its speed squared times the curvature beats gravity, which lets fast cars hop off hills.
- Flight. Gravity, drag that grows with the angle of attack, lift with a soft stall (small for every car, large with Wings), nitro along the car's nose, and tilt input that spins the car. Hands off, the car eases its nose towards a share of its flight path so a first jump lands on its wheels; a full turn counts as a flip, refills a third of the nitro tank and raises the combo. A landing within the car's tolerance keeps part of the speed along the ground (more on a perfect landing), past it the run ends in a crash unless a shield takes the hit. A line under the car shows where it will land, green when the angle is perfect, yellow when safe and red when it would crash.
- Pickups are generated per 100 m chunk from the run's seed: coin arcs (low for rollers, high for flyers), nitro cans, boost rings, balloons that bounce the car up, crows that slow it down (heavy cars smash through them for coins), shields, magnets, a gold rush that triples coin value, and one chest per zone that is only ever found once.
- Economy. Eight upgrade lines with 25 levels each. Each level costs
base × 1.24^level × (1 + level / 12) × 1.6^tier (the tier of the car) and gives 1 − e^(−level / 10) of the line's full effect, so early levels are cheap and big and late ones are expensive and small. Ten cars unlock by best distance and are bought with coins; a new car keeps 60 % of the best upgrade levels. Coins come from distance (0.25 per world unit, times 1.47^zone), from pickups and tricks (also times the zone factor and the combo), and from boosters and the daily systems. World units are drawn as 2 m each. - Balance.
core/balance.test.ts plays whole careers with the bot: run, settle, buy the next car when it opens, else the cheapest upgrades. With BALANCE=1 it writes tmp/far-flung-balance.txt. The bot (fair timing, no flips) reaches the Canyon in about 7 minutes, the Harbour in about 18, the Snowfield in about 40 and the finish in 6 to 7 hours over three careers, never going more than a few runs without a purchase; a player who flips, aims for rings and uses the daily prizes gets there sooner. The first numbers had the Canyon at 3.5 hours; cheaper upgrade growth, stronger effects, more pay per metre and a larger carry-over fixed that. - Daily systems. A seven-day login calendar that waits for you instead of resetting, three daily quests from a pool of seven (with a gem-priced swap and a chest for all three), a free gift every four hours, one prize wheel spin a day (weighted slices), chests with twelve collectible stickers (a full album unlocks gold paint), paints for gems, boosters bought with coins (head start, shield, double coins), a small garage income while away (capped at eight hours), and a +20 % run after five runs without a record, with a hint about what to buy. Coin rewards scale with what an average run pays, so they stay worth having all game long. Nothing is real money and there are no ads.
- Drawing. Phaser 4 (WebGL). All ten cars, wheels, wings, pickups, clouds and hill silhouettes are painted with Canvas 2D at start-up, so there are no image files. The ground, the launch hill with its wooden kicker, the zone walls, trees, distance posts and the best-distance flag are drawn each frame from the same functions the rules use. Each zone has its own palette, blended over the last stretch before its wall. The camera zooms out with speed and height, follows the car exactly and eases only its offset, so a fast car never drifts off the screen. The car is placed by its wheel contact line: on the track both wheels sit on the slope (the physics is a point, the car is not), the drawn angle eases instead of snapping on a landing, and the body dips on a suspension spring. Scenery bands are shaded with smooth gradients faded downwards. Zone weather (pollen, dust, snow, volcano embers, cloud banks you fly through, high-altitude sparkle) lives in viewport space, so it stays on screen at any speed. Wheel dust takes the ground colour, wings leave vapour trails at speed.
- Everything readable is HTML in a road-trip arcade style: navy garage plates with rivets, white enamel tiles, candy buttons with a gloss and a hard lip, yellow ribbon titles. Lilita One sets headlines only, always with an ink outline; Baloo 2 sets every label and number (Lilita's tight counters stop reading below headline size). Both load only with this example. The run HUD is a set of road signs: a highway-green distance sign, an asphalt zone strip (eight zones, the walls, the best flag and the car), an arc speedometer, a combo ring and a nitro button whose ring is the tank. Coins fly from the car to the counter, a perfect jump or landing flashes the screen, a new zone drops a "Now entering" sign. Results count up row by row, show a record ribbon and offer the cheapest upgrade you can afford, which opens the garage on that tile. The cars board is a showroom: the picked car on a turntable, its stats against the car you drive, paint previews on hover.
- Input. Keyboard (Space, W or up to jump and fire nitro, left and right or A and D to tilt, P or Escape to pause, M for sound) and big on-screen buttons on touch screens, merged once per frame.
- Sound is generated with Web Audio (no files) and is off until turned on.
- Reduced motion: no camera shake, slow motion or speed lines, fewer particles, banners fade instead of moving; the game plays the same.
- Saves: the profile is kept in this browser's local storage.
Open: a purpose for the last three cars
Raising the Stratos and Orbit Gate walls (up to 3.2 and 3.8 km), cheaper late cars, earlier unlocks and a bot that saves for cars all pushed the bot's finish to 8 to 12 hours or stalled it at a wall. The cause is the carry-over: a new car starts at 60 % of the best levels and its upgrades cost 1.6× more per tier, so for a long while it flies worse than the fully upgraded car it replaces. A fix needs the carry-over (for example keep 80 to 90 % for tier 6 and up) or the tier cost factor changed together with the late walls; whole runs in the late game are a single glide of several kilometres, so walls only matter as the height a car must still have at that point.