An orbital flight sim written in 6502 assembly for the Commodore 64, running here on a small JavaScript C64. Burn to climb, coast to orbit, warp time to watch the orbit come round, and fly on to the moon.
Starting…
On a keyboard: ← → turn, ↑ ↓ throttle, Space burns, and the keys above work as typed (+ − zoom too). On a phone, hold the keycaps.
Physics runs 50 times a second in the raster interrupt, in fixed point: 24.16 positions, 8.24 velocities, 0.32 accelerations, and gravity of exactly −GM/r³ · position from an exact r². The dotted line is a leapfrog predictor flying a ghost copy of the ship ahead, one orbit at a time.
The moon goes round on rails (its orbit is the grey dotted circle; O hides it). Within 2910 u of it you are in its zone of influence: positions are then relative to the moon and only the moon pulls, as with the spheres of influence in Kerbal Space Program.
Press P to see the cost: the border turns red while the physics runs.
Planet radius 512 u · surface gravity 0.02 u/frame² · engine up to 0.05 u/frame² · moon radius 128 u, 15 360 u out, ¼ the surface gravity · warp up to 256 frames per step