The lander is a variable-mass point under constant gravity g. The engine has a fixed exhaust speed ve = 3050 m/s and a constant thrust force, so as propellant burns the mass falls and the acceleration rises (Tsiolkovsky). Integrated with semi-implicit Euler at a fixed 1/120 s sub-step:
m(t) = m0 − mdot·t, mdot = F / ve, F = a0·m0
T = F / m(t) (thrust acceleration, grows as m falls)
ax = T·sin(θ) (lateral component of thrust)
ay = T·cos(θ) − g (vertical component minus gravity)
vx += ax·dt, vy += ay·dt
x += vx·dt, y += vy·dt
fuel -= burnRate·dt (only while thrusting)
Rotating left/right changes θ, the thrust vector's tilt from vertical, so a tilted burn also pushes you sideways — exactly like a real reaction-control lander. Touchdown is scored against real limits: land with |vertical speed| ≤ 3 m/s, |horizontal speed| ≤ 2 m/s and |tilt| ≤ 12° on the flat landing pad to land safely; exceed any limit, run out of fuel mid-air, or hit rough terrain and it's a crash.
- Gravity — slide from the Moon's 1.62 m/s² up toward Earth's 9.81 m/s² to feel how much harder a heavier world makes the landing.
- Thrust power — the engine's maximum acceleration; too little and you can't out-burn gravity, too much and small taps overcorrect.
- Propellant — share of launch mass that is fuel; burn time = fraction × ve / a0. Every second of thrust consumes it, so wasted braking early can leave nothing for the final flare.
Simplifications: point mass (no centre-of-mass offset or fuel slosh), instant attitude control at 1.6 rad/s, flat-Moon constant gravity, full thrust only (no throttle), no atmosphere (correct for the Moon). The sprite is drawn about 1.3× wider than a real 9.4 m lander so it stays readable.
Independent check: a zero-gravity vertical burn to empty is integrated numerically and compared with the closed-form Δv = ve·ln(m0/mf); the result is shown in the “Physics check” box.