One button, no hold signal: making taps feel analog, and seven more tricks from LIGHTKEEPER
My entry for the one-button game mini hack, LIGHTKEEPER, puts you in a lighthouse on a reef. Ships sail in blind from the dark. The beam sweeps on its own, and one tap reverses its spin. Any ship the light touches turns for home.

How to play
- A tap reverses the beam. It has inertia, so a reversal takes about a third of a second.
- Boats are rescued the moment the light touches them: 1 point.
- Freighters need 0.6 s of light: 3 points. The arc around the ship shows progress.
- A lantern blinking red means that ship is close to the reef. Three wrecks and the lamp goes out.
Tips for a high score
- Tap fast to make the beam hover. Quick reversals cancel out, and a slow beam lights freighters three times faster.
- Swing toward the ship closest to the reef, not the one closest to the beam.
- Don't mash. In my bot tests, random tapping lost in about 19 s, and never tapping in about 39 s.
MATLAB tricks inside
- Every position is a complex number, so z.' + outline.*exp(1i*heading.') turns and places the whole fleet at once. Use .', because ' also conjugates.
- All ships are one patch with a face per ship. NaN vertices hide the ones not sailing. The whole game is 24 graphics objects.
- The beam is a patch with per-vertex alpha ('FaceAlpha','interp'), built once and turned with an hgtransform.
- Setting the axes limits every frame, even to the same values, added about 5 ms to each frame. The screen shake now touches the axes only while it's running.
How long can you keep the lamp lit?
1 Comment
Time DescendingGreat idea: Saving instead of Shooting!🙂
Sign in to participate