Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Doom running in OpenSCAD at 10-20 FPS (mikeayles.com)
2 points by mikeayles 55 days ago | hide | past | favorite | 1 comment
Third entry in my series of running DOOM on engineering tools that weren't designed for games.

KiDoom rendered walls as PCB traces in KiCad. ScopeDoom piped vectors through a headphone jack to an oscilloscope. Now OpenSCAD-DOOM exports geometry to a parametric CAD tool in real-time.

It's a custom Python engine that reads WAD files and outputs OpenSCAD code. Pygame handles input and runs a parallel software renderer. The OpenSCAD side uses Animation mode to bypass the file watcher's 200ms debounce.

I actually started this in December intending to release it at Christmas, but couldn't get the performance above slideshow levels. Parked it. Then last week I had to fix OpenSCAD rendering for another project and discovered the npm openscad-wasm package was from 2022 and silently ignoring the Manifold flag. The fix (https://phaestus.app/blog/blog0031) took renders from 2 minutes to 2 seconds. Rolled that back to OpenSCAD-DOOM and suddenly it was playable. (FYI, the mainline version of openSCAD is 2021.01!)

Blog post: https://www.mikeayles.com/#openscad-doom

Code: https://github.com/MichaelAyles/openSCAD-DOOM

YouTube: https://youtu.be/l9nnV-mO4wY



Now this is some serious doom developments!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: