ee24276fd00f1763e7afd2bb1611acb768e94092
npm test was a brace counter: it checked each file was >10 chars and that {
and } counts matched. It passed on a build whose shader would not compile.
- tests/shaders.test.js compiles the game's real GLSL with glslangValidator
(Khronos' reference compiler) under a three.js-style attribute prefix, and
includes a canary that asserts a known-bad vec4 construction is REJECTED, so
the suite cannot pass vacuously.
- tests/terrain.test.js covers heightfield determinism (the "persistent world"
claim), airport flattening inside the 200 m radius with no leakage outside it,
out-of-bounds behaviour, plausible height range, and vertex colour counts.
- scripts/headless-check.mjs (npm run test:render) serves dist/, drives the
game over raw CDP with SwiftShader software WebGL, and fails if the canvas is
black, the shaders fail to compile, or the scene does not change after input.
No new dependencies: Node 22 built-in fetch/WebSocket. 120 s watchdog so it
cannot hang a runner.
- npm test -> node --test "tests/*.test.js"; old checker kept as npm run lint:syntax.
- CI installs glslang-tools and runs the real tests; render job is
continue-on-error because not every runner has a Chrome binary.
Verified non-vacuous: re-breaking the shader makes the unit tests fail 2/4 with
glslang's own "constructor: too many arguments" and makes the render check fail
four ways (1 distinct colour, 0/64000 lit pixels, shader error, frozen scene).
Wings of the 90s - Flight Simulator
A period-accurate 3D flight simulator inspired by early 90s Amiga/DOS games like Comanche, F-15 Strike Eagle, and After Burner. Runs in any modern browser.
Features
- Authentic retro aesthetic — 320×200 VGA Mode X resolution, CRT post-processing (barrel distortion, scanlines, color quantization, chromatic aberration, vignette), EGA 16-color palette
- Loading screen with progress bar and cycling messages
- Main menu with keyboard navigation
- Procedural terrain — 2000m heightmap with vertex-colored hills, water plane, low-poly clouds
- Airport — Runway with markings, taxiway, control tower, hangars, fuel truck, windsock
- Low-poly Cessna-style aircraft with animated propeller and retractable landing gear
- 6-DOF flight physics — Thrust, drag, lift, gravity, ground friction, auto-leveling
- Flight HUD — Artificial horizon, airspeed, altimeter, heading tape, vertical speed indicator, throttle bar
- Sound — Engine drone tied to throttle, menu beeps
Controls
| Key | Action |
|---|---|
W / S |
Throttle up / down |
↑ / ↓ |
Pitch |
← / → |
Roll |
Q / E |
Yaw (rudder) |
C |
Toggle cockpit / chase camera |
Esc |
Pause / resume |
Getting Started
npm install
npm run dev
Open http://localhost:5173 in your browser.
Build
npm run build
Tech Stack
- Three.js r160 for 3D rendering
- Vite for dev server and builds
- Vanilla JS, no frameworks
- Web Audio API for sound
Languages
JavaScript
90.4%
CSS
4.9%
HTML
4.7%