The same TypeScript you’ve been poking at runs on silicon too. Export it to Verilog, synthesize it, and it runs on an actual FPGA. Here it is on a ULX3S (Lattice ECP5), drawing to a monitor over HDMI, steered with the board’s buttons.
This isn’t a Verilog rewrite of Snake. The game logic and framebuffer are byte-for-byte the circuit you just played, and a CI check fails the build if the browser version and the bitstream ever drift apart.
The video is generated logic too, no display chip in the path. A TMDS encoder turns each pixel into the 10-bit DVI signaling the monitor expects. That, plus the pixel clock and button inputs, is plain Verilog wrapped around the generated core, the same plumbing any ULX3S video project uses. The game is the generated part; this is just the wiring to get it on a screen.
The flow is open the whole way: Verilog → Yosys (synth_ecp5) → nextpnr → ecppack → bitstream. About 100 nodes of logic, and nextpnr closes timing with plenty of headroom over the 25 MHz the design actually runs at.
Run it on your own board
Got an FPGA? The Snake core is plain Verilog, so it synthesizes for any board. The repo has a complete ULX3S (ECP5) build to copy from, plus a README on running it there and porting it elsewhere: you swap the wrapper, the constraints, and the toolchain target, while the game logic stays the same.