Orbit
The physics pillar's acceptance test, wearing a rocket costume. Launch, climb through the air, reach an orbit, and warp along it a thousand times faster than it happens.
controls
It is already flying. Press anything and it is yours.
- Throttle W S
- Turn, in the orbital plane A D
- Timewarp, ×1 to ×1000 , .
- Launch, and restart after a landing SPACE
- Pause and resume Esc
- Fullscreen F11
- Debug overlay F3
- Debug console `
- Pause, fullscreen and the debug overlay keys — unless a control for them is listed above
- Debug console, and its on-screen keyboard the CONSOLE button, once you have touched the canvas
what is actually running
Two ways of moving a spacecraft, and the rule that switches between them.
While the engine is burning or the ship is in the air, the flight is integrated: gravity that falls off as the inverse square, quadratic drag against an atmosphere whose density falls off exponentially with altitude, and thrust against a mass that drops as the tank empties — stepped four times per tick by a symplectic integrator. Terminal velocity on the way down is not scripted anywhere; it is where the drag comes to balance the weight.
Coasting in vacuum with the engine shut down, it is solved instead. The ship's position at some time ahead is the answer to Kepler's equation, which costs the same to ask for a second away as for a century — so a tick at ×1000 advances a thousand seconds without integrating a thousand times, and without the drift a thousand times the steps would accumulate. Ten thousand revolutions later the ship arrives within a centimetre of where it started, which is a test in the repository rather than a claim on a page.
The switch between them is the whole point, and it is a rule rather than a button: the analytic solution is only the truth while gravity is the only force, so opening the throttle or touching the top of the atmosphere drops the warp back to ×1 on the same tick. Try warping on the pad and the controls will refuse you.
The orbit drawn on the map is not an ellipse fitted to the ship. It is the same propagator asked where the ship will be at ninety-six times spread evenly across one period, stroked as a single closed curve through its own answers — which is why the samples crowd together at the far end of an eccentric orbit and spread out as it swings past the planet.
console.log, so log lines are queued
inside wasm and drained by the page each frame. crcbl.audio(),
crcbl.saves() and crcbl.logLevel(4) are there too.