frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

A DOOM vector engine for rendering in KiCad, and over an audio jack

https://www.mikeayles.com/#kidoom
5•mikeayles•1h ago

Comments

mikeayles•1h 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 ScopeDoom GitHub: https://github.com/MichaelAyles/ScopeDoom KiDOOM Write-up: https://www.mikeayles.com/#kidoom ScopeDOOM Write-up: Https://www.mikeayles.com/#scopedoom

The New Must-Have College Admissions Skill: Tolerating Other Viewpoints

https://www.wsj.com/us-news/education/college-admissions-essays-applications-disagreement-questio...
1•JumpCrisscross•3m ago•1 comments

Image models generating partially-eaten burritos over time

https://www.generativist.com/notes/2025/Nov/25/generative-burrito-test.html
1•pathdependent•3m ago•0 comments

Enough with the Brussels Sprouts Already

https://www.theatlantic.com/ideas/2025/11/thanksgiving-food-vegetables-cabbage/685047/
1•petethomas•4m ago•0 comments

Ask HN: Do you sanitize secrets before pasting code into ChatGPT?

1•giovanella•4m ago•0 comments

Show HN: Praval Agentic AI Framework

https://github.com/aiexplorations/praval
1•aiexplorations•4m ago•0 comments

LLVM Adds Constant-Time Support for Protecting Cryptographic Code

https://blog.trailofbits.com/2025/11/25/constant-time-support-lands-in-llvm-protecting-cryptograp...
2•birdculture•5m ago•1 comments

Turning a Sphere Inside Out

https://youtu.be/wO61D9x6lNY?si=eKsRTnRqlzq8ewxl
1•JimmyBuckets•6m ago•0 comments

Navy Cancels Constellation-Class Frigate Program

https://news.usni.org/2025/11/25/navy-cancels-constellation-class-frigate-program-considering-new...
3•mjbellantoni•14m ago•2 comments

How many times can I shift direction before I get a paying user?

https://boldlystatic.com/
1•yinychan•15m ago•1 comments

Ask HN: Have major security breeches been less common lately?

1•Wowfunhappy•19m ago•0 comments

Stop Hacklore – An Open Letter

https://www.hacklore.org/letter
3•todsacerdoti•24m ago•1 comments

Model Context Protocol turns one, releases new spec version

http://blog.modelcontextprotocol.io/posts/2025-11-25-first-mcp-anniversary/
1•dend•25m ago•0 comments

Show HN: Kodaii generated a 20K-line FastAPI back end from one prompt

https://github.com/OlivierKodaii/calendarKodaii
1•vigile•27m ago•0 comments

Texas Buys $5M in BTC ETF as States Edge Toward First Government Crypto Reserves

https://www.coindesk.com/policy/2025/11/25/texas-buys-usd5m-in-btc-etf-as-states-edge-toward-firs...
2•wslh•27m ago•0 comments

Reverse Engineering UberEats and DoorDash

https://tgrcode.com/posts/digging_into_chowline
1•chilipepperhott•29m ago•0 comments

Hamas Victims' Families Sue Binance, Accusing It of Aiding Terrorism

https://www.nytimes.com/2025/11/25/business/binance-hamas-terrorism.html
1•jeffwass•31m ago•0 comments

Academia

https://www.academia.edu/
1•bookofjoe•33m ago•1 comments

A one-stop solution from desiging ER diagram to generating final view data

https://github.com/allmonday/pydantic-resolve
1•tank-34•46m ago•0 comments

Car influencers love Chinese EVs – and China loves them back

https://www.theverge.com/transportation/828155/car-influencer-china-ev-youtube-influencer-pay-play
2•naves•50m ago•3 comments

Notes on the Troubleshooting and Repair of Computer and Video Monitors

https://www.repairfaq.org/sam/monfaq.htm
3•WorldPeas•51m ago•0 comments

Plex's crackdown on free remote streaming access starts this week

https://arstechnica.com/gadgets/2025/11/plexs-crackdown-on-free-remote-streaming-access-starts-th...
5•nobody9999•51m ago•1 comments

Reinventing How .NET Builds and Ships (Again)

https://devblogs.microsoft.com/dotnet/reinventing-how-dotnet-builds-and-ships-again/
4•IcyWindows•54m ago•0 comments

Extracting Reddit data with chat bots

https://blog.hakanserce.com/post/reddit-ai-integration/
2•hakanserce•56m ago•0 comments

Rightness Is a Prison

https://usefulfictions.substack.com/p/rightness-is-a-prison
2•paulpauper•56m ago•0 comments

My Ethical Conundrum Around Writing About Meditation (16/30)

https://psychotechnology.substack.com/p/my-ethical-conundrum-around-writing
2•paulpauper•58m ago•0 comments

How to Sound Like an Expert in Any AI Bubble Debate

https://www.derekthompson.org/p/how-to-sound-like-an-expert-in-any
1•jellyfishrole•59m ago•0 comments

Ask HN: When an AI holds your company hostage, what will be the best defense?

1•isodude•1h ago•0 comments

2025 Weight Loss and Obesity Medication Facts

https://getskinnyjax.com/2025-weight-loss-stats/
1•blocchainz•1h ago•0 comments

Overclocking Dbt: Discord's Custom Solution in Processing Petabytes of Data

https://discord.com/blog/overclocking-dbt-discords-custom-solution-in-processing-petabytes-of-data
2•neighbour•1h ago•1 comments

Wikipedia Replaces IP Addresses with Temporary Accounts for Logged-Out Editors

https://en.wikipedia.org/wiki/Wikipedia:Temporary_accounts
3•tech234a•1h ago•0 comments