# The neon look A second way to draw the same game: `web/neon.js`, WebGL2, chosen in the page's settings (Look: Arcade / Neon) or with **N**; **T** toggles flight paths. The board and its logic are unchanged; the arcade look is still the exact picture MAME's screenshots are checked against. ## What it draws from `Video::render_layers` (Rust, `src/galaga/video.rs`) gives, each frame: - a 256x256 RGBA atlas with every sprite slot's picture in cabinet orientation, 32x32 per slot, drawn by the same code as the arcade picture; - the tile layer (text, score, the tractor beam) as 224x288 RGBA, transparent where no tile pixel is; - with `objects::objects`, each slot's screen box and the game's state byte ([ram-map.md](ram-map.md)). `tests/layers.rs` puts the atlas cells at their boxes in slot order and the tiles over them and requires the arcade picture (stars off), pixel for pixel, for 1,080 frames: the power-on test, attract mode, the game-2400 reference run and stages 11-12 of `movies/tas-seed1.json`. So the neon look draws what the game draws, never a guess. The video latch's bit 7 (flip) is set only at the end of the power-on test (frames 712-862 after power-on, measured 2026-10-01; an earlier note here said it stayed set in play, from a trace cut off at frame 852); it is clear in attract mode and play. Where it is set, it mirrors pictures but not sprite positions in this pipeline, and the layers apply it as the arcade picture does. ## What it adds All of it keyed to the game's own state, observed every emulated frame (so fast-forward misses nothing), drawn once per shown frame: | Effect | Trigger | |---|---| | Explosion: sparks, a flash, a shock ring, in the enemy's colour | an enemy slot enters state 0x04 | | Fighter explosion and screen shake | slot 0x31 enters state 0x08 | | Glowing trails | enemies flying (states 0x03, 0x07, 0x09), rockets and bombs (0x06) | | Flight paths (option) | the whole path of each current flight, thin lines | | Stars | the game's star enable bit, scroll speed and direction (video latch bits 5, 0-2); in play they drift down, as the arcade stars do | | Bloom and tone map | everything bright glows; half and quarter resolution blur | Colours come from the slot roles: bees blue, butterflies red, bosses green, transients magenta, fighters white, rockets cyan, bombs orange. ## Checking it `node web/check-neon.mjs [movie] [frames]` replays a movie with `?look=neon&paths=1` in headless Chromium (WebGL2 via SwiftShader) and screenshots chosen frames into `target/check-neon/`, failing on any page error. `?look=` and `?paths=` pick the look for one visit without saving it.