Night Eagle — a commando game in the browser

2026

A top-down commando game for keyboard and mouse. You land in a valley at night by parachute, sneak past 21 guards and three searchlights, blow up a command bunker and escape to the extraction zone. Built with Phaser 3.90, TypeScript and the Web Audio API.

The game has one level, Operation Night Eagle, from title screen to Mission Complete: briefing, parachute drop over Raven Valley, sneaking and fighting past a trench line, bunkers and a camp, planting explosives at the command bunker (hold F for three seconds, then ten seconds to get clear) and escaping to the extraction zone. There are three checkpoints; the last one comes right after the explosion. The text in the game is English. The feel of the game is inspired by the airborne commando games of the C64 era.

The valley is 2400 by 2400 pixels and holds 21 guards. Each guard runs a state machine with seven states: idle, patrol, suspicious, investigate, combat, search and returning. A guard sees in a 60-degree cone up to 170 pixels away. A suspicion meter fills faster in light, when the player sprints and at a muzzle flash, and slower in bushes and trenches. Sound has a range: walking 40 pixels, sprinting 110, a rifle shot 420, a grenade 600. Guards walk with A* over an 8-pixel grid, take cover behind sandbags and crates and warn each other. Stay in a fight near the radio mast for too long and the general alarm goes off; you can blow up the mast beforehand.

The simulation is separate from Phaser: movement, bullets, sight, sound and grenades are plain TypeScript modules with unit tests in Vitest; Phaser only handles drawing and input. The picture is 640 by 360 pixels, scaled up by whole numbers. Soldiers (16 by 16 pixels, eight directions), terrain, props, light, effects and the font are drawn in code, in one palette of 32 colours. The night is a dark layer in which searchlights, lamps, muzzle flashes and fires cut holes. The command bunker (intact and destroyed), the night panorama of the title screen and the eagle emblem were made in advance with the OpenAI Images API and reduced to the same palette. Sound and music are synthesised live with the Web Audio API, without audio files; the music has three layers for sneaking, fighting and escaping. The game makes no external requests; the download is 423 kB gzip, Phaser included. On a phone or tablet the page shows a still from the game and Phaser is not loaded.

Technologies

Phaser 3.90 TypeScript Vite Web Audio OpenAI Images API

More of my work

Browse the full portfolio or read the blog.

More work