About Lighthouse Keepers

A free artillery duel that runs entirely in your web browser: two lighthouses, two keepers, and a harbour full of rocks and wind between them.

Who makes it

Lighthouse Keepers is made by The Seasoned Programmer. For more, visit the YouTube channel The Seasoned Programmer (@theseasonedprogrammer).

An artillery game

Lighthouse Keepers belongs to one of the oldest families of computer games: the artillery game. Two sides take turns to set an angle and a speed, fire across a landscape, and adjust from where each shot falls. The idea goes back to the early days of computing, and it has been reinvented many times since, with tanks, cannons, castles and catapults. It lasts because it's simple to learn, fair to both sides, and every shot is a small experiment.

Why lighthouses?

Lighthouse keepers lived lonely lives on remote headlands and rocks, tending the lamp through the night so ships could find their way. They weren't the only lifesavers on those coasts: rescue crews kept small line-throwing guns, cannons built to fire a weighted line out to a ship in trouble so a rope could be rigged and the crew brought ashore.

Our keepers have put theirs to a less noble use. They have fallen out, as neighbours sometimes do, and each is determined to put out the other's light. No real keeper would ever have done such a thing.

How this version works

Everything happens in your browser. The harbour, the physics and the computer player are written in TypeScript and run on your own device, and nothing about your matches is sent to a server. The match in progress and your record are saved in your browser's local storage, so you can close the tab and come back later.

Each round builds a new harbour from random numbers: two headlands, the water between them and one to three islets or sea stacks. Shots are worked out step by step, two hundred times a second of flight, with gravity pulling down and the wind pushing sideways, so they follow true curves. The rock is stored as a height for every column of the picture, and each burst lowers it in a round bite.

The computer player tries thousands of possible shots in the current harbour and wind before each turn, and picks the one most likely to hit even if it's slightly off. Then it spoils it with mistakes that depend on its level and shrink after each miss. The numbers quoted in the strategy guide are checked by the site's automated tests against the same physics, so they can't drift from how the game really plays.

Get in touch

Found a bug or have an idea for the game? Contact us. Or go back and play a match.