Night Eagle — a commando game in the browser

2026

A top-down commando game in the browser, June 1944: as an SAS soldier in the Morvan you blow up a radio command centre. Phaser 3.90, TypeScript, Web Audio.

Night Eagle is a top-down commando game with one level, Operation Night Eagle. As an SAS soldier you parachute in June 1944 over the valley of the Cure in the Morvan, in occupied France. You sneak and fight your way past a trench line, bunkers and a camp to a base in the north, plant explosives in the radio room of the radio command centre (hold F for three seconds, then ten seconds to get clear) and escape to the pick-up point, where a Lysander comes for you. The setting is taken from Operation Houndsworth: in June 1944 the 1st SAS parachuted into the Morvan and fought there alongside the Maquis.

The valley is 2400 by 2400 pixels, with the Lac des Settons and the Cure with two bridges. South of the river lie two villages of the Maquis, Mazignien and Ouroux. If you are attacked in a village after making contact, its men fight with you; they can fall. On an airfield a Junkers Ju 52 takes off as soon as the radio command centre goes up.

There are 90 German enemies, in field grey and without Nazi symbols, each in a role: soldiers, officers who see further and react sooner, paratroopers who are tougher, and Luftwaffe ground crew. Each guard runs a state machine with seven states. He sees in a 60-degree cone; his suspicion meter fills faster in light, when you sprint and at a muzzle flash. Kübelwagens, an Opel Blitz, an armoured car and three motorcycles with sidecars drive about with their headlights on.

You move with WASD or the arrow keys, sprint with Shift, aim with the mouse and fire with the left button. G or the right button throws a grenade, R reloads, 1, 2 and 3 pick a weapon, E takes ammunition from a crate, M opens the field map and Esc pauses. You start with a Thompson and 480 rounds, twelve hand grenades, a PIAT with six bombs and a scoped Lee-Enfield with ten rounds. On the title screen you can switch on a cheat mode in which your health and ammunition do not go down.

The game runs on Phaser 3.90. Phaser 4 had only been out since April 2026 and had fewer examples; a custom engine would have meant too much groundwork. Phaser only draws and reads the input; movement, bullets, sight, sound and vehicles are TypeScript modules, and a test checks that they never import Phaser. Instead of Arcade physics everything runs over one 8-pixel grid, so movement, bullets, sight and the guards' A* pathfinding follow the same rules; a vehicle stamps its footprint into that grid every tick and so stops bullets, sight and light. There are 489 unit tests in Vitest, plus a level check for unreachable spots, blocked doors and vehicles that get stuck. The simulation runs in 60 fixed steps a second. Because the picture trembled near the truck and in fights, whatever moves is drawn between two steps and the camera sits in whole pixels, checked with a measuring tool that imitates refresh rates from 30 to 144 Hz and records for every frame where the player and the world are on screen.

The picture is 640 by 360 pixels. Terrain, buildings, soldiers, vehicles and effects are drawn in code, in a palette of 32 colours, each in three tones. Light stops at walls, and the roof of a building disappears when you walk in. The roof of the radio command centre, the title panorama and the emblem were made with the OpenAI Images API and reduced to the same palette; a generated tent, bunker roof and watchtower were unreadable at 20 to 64 pixels. The music is Bach's Toccata and Fugue in D minor (BWV 565) on an organ the game synthesises itself. Guards call out in German, the Resistance speaks French and London comes over the radio: 61 lines, made with OpenAI text-to-speech. The game loads 470 kB gzip, Phaser included; the voices (640 kB) follow in the background. On a phone or tablet the page shows a still and Phaser is not loaded.

Related work: Night Eagle II.

Technologies

Phaser 3.90 TypeScript Vite Web Audio OpenAI Images API OpenAI text-to-speech

More of my work

Browse the full portfolio or read the blog.

More work