Kerbal Sandbox
README.md
Orbiteer
The whole Orbiteer game in one world component, attached to the scene's GameManager entity.
What it owns
- Main menu / Settings / Pause — zui screens with volume, control sensitivity, invert-pitch, and difficulty (gravity/atmosphere scaling).
- VAB — click-to-stack rocket assembly with a live 3D preview on the pad, stage decomposition at decouplers, per-stage delta-v/TWR/burn-time readouts (via
orbiteer.OrbParts), and saved designs. - Flight simulation — point-mass gravity toward the planet (moon SOI patched-conic), thrust along the nose, exponential-atmosphere drag, fuel drain and mass update, staging with visible separation debris, ground/moon contact, and revert-to-launch. Integrated with substepped semi-implicit Euler in
update(dt). - HUD — altitude/velocity/Ap/Pe/TWR top bar, throttle + stage-fuel gauges, stage indicator, navball-style attitude canvas, milestone toasts.
- Map view (
M) — canvas top-down of the planet, atmosphere ring, moon + moon orbit, craft marker, and the live Keplerian trajectory ellipse with Ap/Pe markers (viaorbiteer.OrbMath). - Audio — throttle-scaled engine rumble, speed/density-scaled wind, staging thunk + whoosh, low-fuel beeps, milestone chimes, UI clicks (clips from
orbiteer.OrbAudio). - Persistence — best altitude, reached-orbit flag, saved designs, and settings under the
orbiteer.*keys of the world settings.
Controls
Space stage · Z/X throttle full/cut · Shift/Ctrl throttle trim · WASD pitch/yaw · Q/E roll · T SAS · M map · wheel zoom · R revert · Esc pause.
Introspection
entity.find("GameManager").component.get("Orbiteer"):status() returns the live game/flight snapshot (mode, state vector, orbital elements, stage, fuel, milestones) — useful for testing and tooling.
Tuning
Public fields hold the world constants: planet radius, surface gravity, atmosphere height/scale-height/density, moon orbit/radius/SOI/period. Difficulty from Settings scales gravity and atmosphere on the next launch.