Doom. In Kicad
Loading README and project media…
Run DOOM inside KiCad's PCB editor using real PCB traces as the rendering medium. Wall segments become copper traces, entities become footprints, and projectiles become vias.
# Python dependencies
pip3 install pygame # For standalone renderer
# SDL2 (for dual-output mode)
brew install sdl2 # macOS
cd doom/source
./build.sh
This will:
Dual Mode (Recommended) - Shows both SDL window and vectors:
./run_doom.sh dual -w 1 1 # Skip straight to E1M1
Standalone Testing - Test vectors without KiCad:
# Terminal 1
./run_standalone_renderer.py
# Terminal 2
./run_doom.sh vector -w 1 1
KiDoom/
├── run_doom.sh # Main entry point for DOOM
├── run_standalone_renderer.py # Entry point for vector renderer
├── CLAUDE.md # Claude Code instructions
├── README.md # This file
│
├── src/ # Source code
│ └── standalone_renderer.py # Pygame vector renderer
│
├── kicad_doom_plugin/ # KiCad plugin
│ ├── __init__.py
│ ├── doom_plugin_action.py # Main plugin
│ ├── pcb_renderer.py # PCB rendering
│ ├── doom_bridge.py # Socket communication
│ └── ...
│
├── doom/ # DOOM engine
│ ├── doomgeneric_kicad # Vector-only binary
│ ├── doomgeneric_kicad_dual # SDL + vectors binary
│ ├── doom1.wad # Game data
│ └── source/ # C source code
│
├── tests/ # Test scripts
├── scripts/ # Utility scripts
└── logs/docs/ # Development documentation
Instead of scanning the pixel buffer (64,000 pixels), we extract vectors directly from DOOM's internal data structures:
drawsegs[] array - actual 3D-to-2D projected line segmentsvissprites[] array - sprite positions and scalesThis provides a ~200-500x performance improvement over pixel scanning.
The doomgeneric_kicad_dual binary:
Perfect for side-by-side comparison!
When used with KiCad:
PCB_TRACK objects on F.Cu/B.CuFOOTPRINT objects (QFP-64, SOT-23, etc.)PCB_VIA objectsPCB_TEXT on F.SilkSSee logs/docs/ for chronological documentation showing:
Each file is timestamped showing when it was created during development.
The bottleneck is KiCad's PCB refresh, not DOOM or the communication layer.
Smiley Face Test (simple timer test):
export KIDOOM_TEST_MODE=true
open -a KiCad
# Then run plugin normally
Standalone Renderer (full pipeline without KiCad):
./run_standalone_renderer.py # Terminal 1
./run_doom.sh vector -w 1 1 # Terminal 2
KiCad plugins on macOS crash when modifying PCB objects from background threads. The current solution uses:
See logs/docs/11_*_FINAL_FIX_V3.md for details.
Current extraction reads drawsegs[] for walls and outputs them as vertical lines. This works but doesn't look exactly like DOOM yet. The architecture is sound - just needs refinement of the extraction algorithm.
See LICENSE file.
DOOM engine: https://github.com/ozkl/doomgeneric