Explorer’s Lab › Project dossiers › Phosphor Siege

Project dossier

Phosphor Siege

Status
In development · Gen 1
Platforms
Play in browser
Built with
Claude Code (Claude Opus 5.5), TypeScript 7.0, Vite 8.4, WebGL2 (custom CRT shader, Canvas 2D fallback), Web Audio API (live synthesis), Vitest 5.1 (headless simulation tests)
Frozen generations
None yet
Build sessions logged
3 (2 Autonomous, 1 AI-assisted)
Assets
13 logged below

▶ Play Phosphor Siege

Dossier updated 28 Nov 2026.

Summary

Phosphor Siege is an original late-1970s-style fixed shooter for the browser. Claude Code (Claude Opus 5.5) built it in one session on 28 November 2026 from a single prompt (see BRIEF.md). The prompt asked for an authentic recreation of a famous 1978 arcade game. Claude Code made an original game in that genre instead: new name, new pixel art, new sounds and a new colour scheme, with rules and timing based on research into how the period hardware behaved.

This is Gen 1, imported as a built static snapshot.

How it was built

Research. Two web searches and one page read of a public annotated disassembly of the 1978 board’s code (Computer Archeology). The facts taken from it:

  • the one-invader-per-interrupt movement
  • the 2 px step (3 px for a lone invader moving right)
  • the score thresholds for missile reload
  • the starting heights of later waves
  • the alive-count-to-tempo table for the march sound
  • the idea that the mystery ship’s value depends on the shot count

Facts the research didn’t confirm were chosen by judgement and are labelled that way in the code comments: the saucer speed, the missile speeds, the 25-second saucer timer and the colour-band positions.

What is original. All sprites (three invader ranks, cannon, saucer, explosions, missiles, bunker), the 5×7 font, the colour palette (ember / white / aqua bands), the four march notes, the missile column sequences and the mystery-ship score order (the 300 sits at a different place in the table). Sprites were drawn as text pixel grids. In two cases the first drafts came out too close to the classic designs, so they were deliberately redrawn before any code depended on them.

Architecture (about 1,900 lines of TypeScript):

  • game.ts: rules and state machine
  • bitmap.ts: a 1-bit 224×256 frame buffer with pixel-perfect blit, erase and overlap tests
  • sprites.ts: art and font
  • renderer.ts: the colour-film overlay, a WebGL2 CRT shader (curvature, bloom, scanlines, aperture grille, vignette, flicker), CPU-side phosphor persistence, and a Canvas 2D fallback
  • audio.ts: Web Audio synthesis with oscillators, LFSR noise and an LFO saucer warble
  • input.ts: keyboard, Gamepad API and touch
  • main.ts: a fixed 60 Hz timestep, 3:4 layout, Wake Lock, Fullscreen, and service-worker registration

Toolchain

  • AI: Claude Code (desktop app, Code tab), model Claude Opus 5.5 (claude-opus-5-5).
  • Build: Vite 8.4 (base: './') and TypeScript 7.0 (the native compiler). No runtime dependencies.
  • Tests: Vitest 5.1, with 10 headless simulation tests covering the ripple movement, edge reversal, wave clear, scoring, the extra life, the saucer table, lives and game over, invasion, rendering, and a 5-minute random soak.
  • Verification: Claude Code’s built-in browser pane, plus a scripted headless Chrome via playwright-core for the media.
  • Icons: made by a small dependency-free PNG encoder script (scripts/make-icons.mjs).

Credit ledger

Area Who did what Autonomy
Brief Derek wrote the one-paragraph prompt (BRIEF.md) and asked for an 80s-authentic browser game that can be deployed to a VPS sub-directory. human-made
Research, design, code, art, sound, tests Claude Code (Claude Opus 5.5) researched the hardware behaviour, chose to make an original game in the genre, and wrote all the code, sprites, font, shader and sound synthesis. It also wrote the tests and the deploy tooling (rsync script, nginx and Apache configs) and play-tested in its browser pane at desktop and phone width. Derek gave no design direction or playtest feedback. autonomous
Running locally and committing Derek asked for a local dev server and a commit, and Claude Code did both. autonomous
Catalogue import Claude Code made the changes for this site and committed them in the source repo: a ../ back link, window.wolfWorld telemetry, and hiding the header title on narrow screens. It then copied the build, captured the media and wrote these notes, following PUBLISHING.md from Derek’s pasted prompt. autonomous

Overall: autonomous. Nothing beyond the brief was supplied. No human has yet playtested it for game feel or difficulty.

Metrics

  • Playable build (static/): 8 files, 43,783 bytes uncompressed. The JS bundle is 31.8 KB minified and 10.6 KB gzipped. There are no image or audio files: all art and sound is generated at runtime.
  • Source: about 1,875 lines of TypeScript in src/, plus CSS and about 140 lines of tests.
  • Wall-clock: the original build, research included, was one session on 28 November 2026. Timings weren’t measured precisely.
  • Tests: 10 out of 10 pass (npm test in the source repo).
  • No ads, analytics, trackers, CDN requests or runtime AI calls.

Where the source lives

  • Source: a local git repository on Derek’s Mac at ~/ClaudeCode/SpaceInvaders_CC. It has no remote.
  • Imported version: commit e8c4a0e (28 November 2026). The game itself is commit 00d3baf. Commits 51ae2e1 and e8c4a0e add the changes for this site.
  • Rebuild: in the source folder, run npm install && npm run build. Then copy dist/ into projects/phosphor-siege/static/, leaving out dist/.htaccess. That file is only for running the game on its own on an Apache server, and this site serves its own headers.
  • Brief: saved verbatim in BRIEF.md.

Notes for the site

  • The build registers a service worker (sw.js) for offline play. It’s scoped to the folder it’s served from, so /play/ and any future /genN/ each get their own. Page loads go network-first, so new deployments show up. Hashed assets are cache-first.
  • The ◀ BACK link only appears when the path ends in /play/ or /genN/, so standalone deployments elsewhere don’t show a dead link.

Asset provenance

Every asset that isn't generated at runtime: how it was made, by whom, and under what licence.

FileHow it was madeMade byLicence
static/index.htmlVite 8.4 production build (base: './') of the Phosphor Siege source repo, commit e8c4a0e.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
static/assets/index-CpoIghMp.jsBundled, minified game code (TypeScript in src/). Contains all sprite art as text pixel grids, the 5×7 font, the CRT shader and the sound synthesis. No third-party runtime code. (Sprites, font and sound are original and produced from code at runtime; no image or audio files are shipped.)Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
static/assets/index-BBJ-sKSp.cssPage and cabinet styles from src/style.css, built by Vite.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
static/icons/icon.svgHand-written SVG of the game's 'Beetle' invader sprite.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
static/icons/icon-192.pngGenerated by scripts/make-icons.mjs in the source repo (dependency-free PNG encoder drawing the Beetle sprite).Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
static/icons/icon-512.pngGenerated by scripts/make-icons.mjs in the source repo.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
static/manifest.webmanifestPWA manifest (relative start_url and scope) from public/ in the source repo.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
static/sw.jsService worker for offline play, scoped to the folder it is served from; from public/ in the source repo.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
media/icon.pngCopy of static/icons/icon-512.png.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
media/hero.jpgHeadless Chromium (playwright-core) screenshot of the built game at 1280×720, mid-game, with a scripted bot steering and firing.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
media/gameplay.jpgHeadless Chromium (playwright-core) screenshot of the built game, mid-game, at desktop size.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
media/title.jpgHeadless Chromium (playwright-core) screenshot of the attract screen with its point table.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.
media/phone.jpgHeadless Chromium (playwright-core) screenshot at 375×812 with touch emulation, showing the on-screen controls.Claude Code (Claude Opus 5.5)Project-owned; published on Wacky Wolf Explorer at Derek's request.

Build logs

  • Import Phosphor Siege into Wacky Wolf Explorer
    28 Nov 2026 · Claude Code (Claude Opus 5.5) · Autonomous
    Added a ../ back link and wolfWorld telemetry to the source, copied the built snapshot into static/, captured media, wrote project.json and the Lab notes, and passed build and check with the full contract test.
  • Research and build of Phosphor Siege from a one-line brief
    28 Nov 2026 · Claude Code (Claude Opus 5.5) · Autonomous
    Researched how the 1978 arcade hardware behaved, then built an original fixed shooter around those mechanics with Vite 8, TypeScript 7, a WebGL2 CRT shader and Web Audio synthesis, plus tests and VPS deploy tooling.
  • Review before merge
    28 Nov 2026 · Claude Code (Claude Opus 5.5) · AI-assisted
    Reviewed the import branch per PUBLISHING.md §11; no changes were needed to the game or its notes.