frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: KiDoom – Running DOOM on PCB Traces

https://www.mikeayles.com/#kidoom
250•mikeayles•12h ago
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

Comments

robbru•9h ago
Of course I love this. DOOM forever.
Lerc•9h ago
One of my to-do-one-day projects is an audio jack display system out of a Microcontroller.

Was never quite sure if I should raw XY it or soft modem so I could decode on a web page on a handy device.

retrac•9h ago
> raw XY it or soft modem

How about analog raster scan? a.k.a. slow-scan TV? [0] Like how they returned the live television images from the Apollo missions. (They only had 1 MHz of bandwidth for everything - voice, computer up and downlink, telemetry, and TV. Standard analog broadcast TV was 6 MHz. So they reduced the scan rate to 10 frames per second instead of 60, and halved the horizontal line resolution -- that could fit in 500 kHz.)

Most modern SSTV standards are super-narrowband, designed to fit into just a few hundred Hertz for amateur radio. But what if you had the full 20 kHz of bandwidth of a nice audio channel? With 100 horizontal lines per frame, and 1 frame per second -- that is about 200 cycles per horizontal line, or enough to resolve, in theory, 100 vertical lines on each horizontal line. I.e., 100 x 100 pixels (ish) at 1 fps.

[0] https://en.wikipedia.org/wiki/Slow-scan_television

Lerc•5m ago
Now that does present some interesting possibilities.

It looks like a web page with audio input permissions can be expected to sample at 48KHz I wonder what the quality is like from a cable bodged off a spare pin.

A little webapp running on your phone could actually do some nifty on-the-fly display.

mlhpdx•9h ago
I don’t care how this makes the world a better place, because it just does.
djmips•8h ago
This is just a meme now. Doom running on X. I don't get it but congratulations on your very whimsical accomplishment!
sethaurus•8h ago
This is a little different from most "Doom on X" projects, because the accomplishment is less about the hardware (it's just a normal computer) and more about turning a circuit-board designer into a real-time game display.
djmips•8h ago
That's very cool. A very good use of your free time. The world needs more whimsy!
wpm•8h ago
Just like Doom running on Factorio combinators.

https://www.youtube.com/watch?v=0bAuP0gO5pc

ant6n•1h ago
Wir a Minute, that’s Wolfenstein! (Raycasting)
nurettin•8h ago
I wish doom ran on X.
sho_hn•8h ago
Sorry, only Wayland allowed.
georgefrowny•1h ago
Funnily enough, Wayland doesn't support KiCad very well. https://www.kicad.org/blog/2025/06/KiCad-and-Wayland-Support...
georgefrowny•2h ago
Doom on X (or rather "Can it run Doom?") is one of the original internet memes, dating way back to the 90s.
sho_hn•8h ago
Love ScopeDoom!

KiDoom I don't fully get. The website says "All components connected to a shared net; the PCB could be sent to a fab house (it just wouldn't do anything useful)" but I don't see any of the component pins hooked up in the demo video.

hbnjjgff•5h ago
What don't you get? The pins are not hooked up, so the PCB wouldn't do anything useful
sho_hn•5h ago
It means they're not actually "all connected to a shared net", no?

Something that actually connects the components and routes the traces in a way that makes it somehow still recognizable as the 3D environment would've been cool, otherwise this is kind of just like piping draw commands into a <canvas> from a hook in the Doom renderer. KiCAD just happens to be a complicated line drawing app.

Don't get me wrong, still a fun little hack. But some more PCB-ness would make it even cooler.

It might be that the website undersells it and there's more PCB-ness than I can detect in the visuals. Is it using layers and vias between them for the z-sorting or so? Both the website and the commits have a distinct AI slop feel to them and are somehow not very detailed on this part.

mikeayles•3h ago
So the reason everything is on one net is so kicad doesn't need to calculate a ratsnest/air wires.

As for the drawing, we pulled the vectors as a list from the C, and used a painters algo and drew back to front using the distance from the player in the python code.

We then treated them as polygons to allow us to work out occlusion to hide things behind walls, but the data pipes to kicad/the headphone jack is just the vector/wireframes/outlines, filtered by what's left after the occlusion test.

So yep, using footprints as sprites was my (clunky) nod to electronics, as I didn't like the idea of drawing polygons. Kicad can definitely handle them, but they're less fun.

Now, if I'm really bored over Christmas, I may port it to fusion360, which will have a 3d engine.

I 100% abused Claude code to get here, and i tend to get it to write the bones of a write up, which I then populated with my own thoughts, else I can't get started. We are worryingly becoming more aligned.

actinium226•7h ago
Lol, I jsut started learning KiCAD last week, and I work in at a game dev coworking space, so this is a perfect combination of the two! Nice!
ChrisGammell•7h ago
Never Trust The Automap
bruckie•7h ago
This is amazing. It feels like it could be a tom7 project (https://tom7.org/, https://youtube.com/@tom7).
mikeayles•3h ago
What an honour, thanks
GaryBluto•6h ago
Awesome project, but why is the page a semi-transparent overlay on another page?
jacquesm•4h ago
Inception version: make it so shooting components degrades the machine it runs on.
p0w3n3d•4h ago
You remind me about Atari XL/XE game "Inside", which was fighting some dust balls or what? inside the Atari. If a circuit was broken you had to fly there and fix it, but when for example Pokey was broken the music was distorted, Antic - the screen was distorted etc
ollybee•1h ago
A bit like psDooM
oniony•1h ago
The obvious next step is to play Doom rendered as actual PCBs. Each frame is automatically ordered online and then, when it arrives two weeks later, slotted into a holder whilst the bored player contemplates their life choices.

Show HN: KiDoom – Running DOOM on PCB Traces

https://www.mikeayles.com/#kidoom
250•mikeayles•12h ago•27 comments

Show HN: We built an open source, zero webhooks payment processor

https://github.com/flowglad/flowglad
316•agreeahmed•17h ago•178 comments

Show HN: Wolfrominoes

https://demos.samgentle.com/wolfrominoes/
7•sgentle•3d ago•1 comments

Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery

https://wordpress.org/plugins/bandwidth-saver/
54•cr1st1an•8h ago•32 comments

Show HN: I built directory of fashion brands because I didn't know how to dress

https://brandlist.it.com
2•EthanSeo•2h ago•2 comments

Show HN: I built an interactive HN Simulator

https://news.ysimulator.run/news
497•johnsillings•1d ago•212 comments

Show HN: Constitutional AI Agent OS (governance enforced at kernel level)

https://github.com/kimeisele/steward-protocol
3•harekrishna108•3h ago•1 comments

Show HN: Anthony Bourdain's Lost Li.st's

https://bourdain.greg.technology/
2•gregsadetsky•3h ago•1 comments

Show HN: Parm – Install GitHub releases just like your favorite package manager

https://github.com/yhoundz/parm
3•houndz•10h ago•1 comments

Show HN: OCR Arena – A playground for OCR models

https://www.ocrarena.ai/battle
210•kbyatnal•4d ago•62 comments

Show HN: Datamorph – A clean JSON ⇄ CSV converter with auto-detect

https://datamorphio.vercel.app
22•sumit_entr42•5d ago•6 comments

Show HN: Search London StreetView panoramas by text

https://london.publicinsights.uk
38•dfworks•5d ago•14 comments

Show HN: Cynthia – Reliably play MIDI music files – MIT / Portable / Windows

https://www.blaizenterprises.com/cynthia.html
85•blaiz2025•1d ago•30 comments

Show HN: Stun LLMs with thousands of invisible Unicode characters

https://gibberifier.com
195•wdpatti•2d ago•105 comments

Show HN: I wrote a minimal memory allocator in C

https://github.com/t9nzin/memory
133•t9nzin•2d ago•32 comments

Show HN: We cut RAG latency ~2× by switching embedding model

https://www.myclone.is/blog/voyage-embedding-migration/
23•vira28•1d ago•3 comments

Show HN: I Figured It Out

https://www.adama-platform.com/learn
3•mathgladiator•11h ago•0 comments

Show HN: Rs-Utcp, a Rust Implementation of the Universal Tool Calling Protocol

https://github.com/universal-tool-calling-protocol/rs-utcp
2•juanviera23•13h ago•0 comments

Show HN: MCP Security Scanning Tool for CI/CD

https://smart.mcpshark.sh/
12•devops-coder•14h ago•0 comments

Show HN: Build the habit of writing meaningful commit messages

https://github.com/arpxspace/smartcommit
109•Aplikethewatch•3d ago•131 comments

Show HN: Deft-Intruder – Real-time malware detection daemon for Linux

https://github.com/539hex/deft-intruder
4•539hex•20h ago•0 comments

Show HN: Virtual SLURM HPC cluster in a Docker Compose

https://github.com/exactlab/vhpc
57•ciclotrone•6d ago•14 comments

Show HN: Hypercamera – a browser-based 4D camera simulator

https://dugas.ch/4d_creatures/4d_camera.html
19•chronolitus•6d ago•4 comments

Show HN: Supabase-Test – Fast Isolated Postgres DBs for Testing Supabase RLS

https://www.npmjs.com/package/supabase-test
29•pyramation•5d ago•10 comments

Show HN: Forty.News – Daily news, but on a 40-year delay

https://forty.news
438•foxbarrington•3d ago•178 comments

Show HN: I built an interactive map of jobs at top AI companies

https://map.stapply.ai
15•kalil0321•1d ago•5 comments

Show HN: Wealthfolio 2.0- Open source investment tracker. Now Mobile and Docker

https://wealthfolio.app/?v=2.0
672•a-fadil•4d ago•213 comments

Show HN: Experimental eBPF Firewall in Rust with Heuristic Risk Scoring

https://github.com/N1ghttm4r33/Antivirus
2•n1ghtm4rr3•16h ago•0 comments

Show HN: SafeShare – Clean tracking params locally (PWA and bookmarklets

https://j-ai-71.github.io/Supersystem/
2•safeshare•17h ago•0 comments

Show HN: ZenPaint, a pixel-perfect MacPaint recreation for the browser

https://zenpaint.org/
7•allthreespies•17h ago•0 comments