Lunar Lander
The World
The Control
The Code
Information
The world is simulated in Javascript. We are landing on the moon, with an acceleration due to gravity of 1.625 m/s/s. Try not to come down too steep (more than 45 degrees left or right) or too fast (more than 10 m/s) (this is three times faster than the Apollo Lander could handle, but a more realistic speed would make the game more annoying).
The lander controls are handled by a UXN emulator. The basic example code we can load has a way to control thrust, the RCS, and the radar. The device section at the top of the example code documents the Lander device
The horizontal 0-f is a clickable element. It is used to set and display control nibbles. The first Thrust row represents that amount of thrust: 0 for none f for max. The second Thrust row represents the tenths of a second to fire. So a is one second.
The RCS controls have their own 0-f for the RCS duration. There's also a free-form thruster selector on the left and some presets on the right. Tapping a preset once will select it. Tapping it when it is already selected will trigger another RCS fire with the most recently selected duration.
Angles are represented as decimal degrees with a 1/10 degree resolution. The pad angle is relative to the lander (so down would be 180.0). The lander angle is measured with 0 as up and rotating counter-clockwise.
The distances are measured to the 45 degrees below left, down, 45 degrees below right, and to the landing pad. The distances are shown as hex digits of decimeters. Any distance ffff or longer (about 6.5km) is out of range and is shown as ffff. The rate is shown as decimeters per second in hex. Positive rate indicates moving away from the radar's target. Negative indicates moving towards the target.
You can tweak the uxntal code, rebuild it, and run it. The most recently built code is saved to local storage, so it should reload next time you open the page. The example code will wipe this out.
The Infrastructure
I'm relying on the uxn5 emulator by Devine Lu Linvega for the UXN and Varvara emulation. I'm also using the drifloon (part of the drifblim project) assembler, also by Devine Lu Linvega to actually turn the uxntal code into a rom for the VM to run.