Ki

KiDoom – Running DOOM on PCB Traces

Hacker News

KiDoom – Running DOOM on PCB Traces

I got DOOM running in KiCad by rendering it with PCB traces and footprints instead of pixels. Walls are rendered as PCB_TRACK traces, and entities (enemies, items, player) are actual component footprints - SOT-23 for small items, SOIC-8 for decorations, QFP-64 for enemies and the player. How I did it: Started by patching DOOM's source code to extract vector data directly from the engine. Instead of trying to render 64,000 pixels (which would be impossibly slow), I grab the geometry DOOM already calculates internally - the drawsegs[] array for walls and vissprites[] for entities. Added a field to the vissprite_t structure to capture entity types (MT_SHOTGUY, MT_PLAYER, etc.) during R_ProjectSprite(). This lets me map 150+ entity types to appropriate footprint categories. The DOOM engine sends this vector data over a Unix socket to a Python plugin running in KiCad. The plugin pre-allocates pools of traces and footprints at startup, then just updates their positions each frame instead of creating/destroying objects. Calls pcbnew.Refresh() to update the display. Runs at 10-25 FPS depending on hardware. The bottleneck is KiCad's refresh, not DOOM or the data transfer. Also renders to an SDL window (for actual gameplay) and a Python wireframe window (for debugging), so you get three views running simultaneously. Follow-up: ScopeDoom After getting the wireframe renderer working, I wanted to push it somewhere more physical. Oscilloscopes in X-Y mode are vector displays - feed X coordinates to one channel, Y to the other. I didn't have a function generator, so I used my MacBook's headphone jack instead. The sound card is just a dual-channel DAC at 44.1kHz. Wired 3.5mm jack → 1kΩ resistors → scope CH1 (X) and CH2 (Y). Reused the same vector extraction from KiDoom, but the Python script converts coordinates to ±1V range and streams them as audio samples. Each wall becomes a wireframe box, the scope traces along each line. With ~7,000 points per frame at 44.1kHz, refresh rate is about 6 Hz - slow enough to be a slideshow, but level geometry is clearly recognizable. A 96kHz audio interface or analog scope would improve it significantly (digital scopes do sample-and-hold instead of continuous beam tracing). Links: KiDoom GitHub: https://github.com/MichaelAyles/KiDoom , writeup: https://www.mikeayles.com/#kidoom ScopeDoom GitHub: https://github.com/MichaelAyles/ScopeDoom , writeup: https://www.mikeayles.com/#scopedoom

Share card

Actual performance

362points
49comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: started · Missing: supports, reddit linkedin, podcasting
86%86% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: ide, 000, io · Missing: https docs, excited, just released
66%66% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Product HuntOn track for Day 1 leaderboard · Strong signals: mac, new, physical · Missing: agents, macos, agent
62%62% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
50%50% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: interface, calls · Missing: plus, platform, intuitive
35%35% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: arr · Missing: mrr, revenue, profit
16%16% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: audio · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ru
Running WebAssembly on ARM67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Running WebAssembly on ARM

Hacker News1
Ob
Oberon System Running on LuaJIT52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Oberon System Running on LuaJIT

Hacker News2
Ha
Hash functions from C++ running in WebAssembly67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Hash functions from C++ running in WebAssembly

Hacker News7
Ru
Running for stuck to chair programmers44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Running for stuck to chair programmers

Hacker News5
Lu
Luakernel – Lua + SQLite + musl libc running on x8689%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Luakernel – Lua + SQLite + musl libc running on x86

Hacker News115
Recontact
Recontact56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Always running out of namecards? Recontact is the cure.

Indie Hackerscommitment-side-project
Run161
Run16154%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Everything about running

Indie Hackers1$50/mohealth-fitness
Steadyop
Steadyop47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Your operation running steady

Indie Hackerscommitment-side-project
Th
The Y combinator running in your browser58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The Y combinator running in your browser

Hacker News3
Th
The Y combinator running in the browser58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The Y combinator running in the browser

Hacker News4