Settings

Theme

Show HN: Doom running in OpenSCAD at 10-20 FPS

mikeayles.com

2 points by mikeayles 18 days ago · 1 comment · 1 min read

Reader

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

possan 17 days ago

Now this is some serious doom developments!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection