Show HN: Doom rendered in OpenSCAD geometry, now playable in browser
3 hours ago (doom.mikeayles.com)
Creator here. Third in a series of running DOOM on engineering tools - KiDoom rendered walls as PCB traces in KiCad, ScopeDoom piped vectors through a headphone jack to an oscilloscope.
This one exports frame geometry to OpenSCAD, a parametric CAD tool. The browser version uses Three.js to render the same geometry the desktop version writes to .scad files.
The desktop version was stuck at slideshow framerates until I fixed OpenSCAD's WASM renderer for another project - the npm package is from 2022 and silently ignores the Manifold flag. Switching to the 2025 build took renders from 2 minutes to 2 seconds. (Writeup: https://phaestus.app/blog/blog0031)
But openscad-wasm isn't a renderer, it's a compiler. Each frame was compiling to STL then rendering - maybe 1fps sequential, better parallelized but with ~1s latency. Fine for previewing an item, but as a rendering pipeline it's no good for real time playback.
So I removed openscad-wasm entirely and wrote a custom parser that converts OpenSCAD code to an AST, evaluates it to geometry, and renders via Three.js. The scad code is the only input - what you see comes from the same .scad you can copy, download, and run in desktop OpenSCAD or the playground to validate.
Technical writeup: https://www.mikeayles.com/#openscad-doom
YouTube: https://youtu.be/l9nnV-mO4wY
Desktop version source: https://github.com/MichaelAyles/openSCAD-DOOM Web version source: https://github.com/MichaelAyles/openSCAD-DOOM-web
No comments yet
Contribute on Hacker News ↗