Chromium/Chrome only.
Try it out here
A Chip-8 emulator that runs purely in CSS & HTML. A Rust compiler converts Chip-8 ROMs into pure css. Try it out with Tetris, Space Invaders, Pong or any other Chip-8 program you got!
No. There is not a single line of JavaScript ( or WebAssembly ) used anywhere in the demos.
HTML is used to load the actual styles, as well to provide controls ( via buttons & checkboxes ), a screen (div) for output, and a container (div) for the clock.
It fills pixels individually on the 64×32 screen div via gradients ( background-image:linear-gradient )
Any standard Chip-8 ROM, it is not specific to the given demo games. The labels on controls have been mapped to make it easier to play the games - but thats just a visual QoL improvement.
Brix reaches around 1.1k instructions per second. On low-end machines it can feel pretty laggy. On my mac m3 it is smooth enough to be playable.
Sadly I’ve yet to figure out a way to dynamically generate and play sound in an elegant manner. While it is possible to trigger audio via css, I’ve not got around to testing it further.
Huge legwork was done by these people, full credits to them: