Inspiration

Electronics fails students not because it's hard, but because voltage drops on a whiteboard give no intuition for what current actually does. We wanted to make the physics something you feel, not just read.

What it does

Circuits as a Quest transforms any circuit schematic into a playable 2D pixel-art RPG scene in seconds.

Upload a circuit image, KiCad schematic, or LTspice netlist — Gemini Vision parses it, a full MNA solver runs Kirchhoff's laws, and a living RPG world generates from the results.

Every component becomes a landmark. Resistors are swamps that slow your hero proportional to resistance. Capacitors are dungeon cells that hold the hero for exactly R×C seconds. LEDs are bonfires that only light when current flows. Short circuits trigger a lava world. Open circuits leave a broken bridge the hero can't cross.

Hero speed is derived from real current — not a timer. Six biomes are chosen automatically from the circuit's characteristics.

How we built it

We split into three parallel workstreams using git worktrees, each owning a separate layer of the stack.

The sim branch implements a full MNA engine in TypeScript — conductance matrix, Gaussian elimination, and fault detection built from scratch with no external math libraries.

The frontend branch builds the PixiJS RPG canvas — six biome tilemaps, seven landmark sprite types, physics-driven hero movement, day/night cycle, and ElevenLabs narration.

The canvas branch adds an infinite React Flow circuit builder, with the RPG world updating live on the right as you place components on the left.

Challenges we ran into

The MNA solver was the hardest problem — floating nodes and open circuits produce singular matrices that crash the solve, so fault detection had to be built into matrix construction itself.

Mapping circuit topology to a coherent RPG world required a depth-first layout algorithm to correctly place series paths and forking parallel branches before the renderer runs.

Getting Gemini Vision to return reliable structured JSON required significant prompt engineering, especially for hand-drawn schematics.

Accomplishments that we're proud of

Every voltage, current, and hero speed in the game is computed from real circuit equations — nothing is hardcoded.

The full pipeline from photo upload to playable RPG scene runs in under 15 seconds.

Watching the RPG world update in real time as you place a resistor on the canvas is genuinely surprising every time.

What we learned

Forcing every educational insight through "what does the hero feel?" made us understand the physics more deeply than any textbook had.

The best demo is always the one that surprises the audience in the first ten seconds.

What's next for GroundWire - Circuits as a Quest

AC circuits with phasors and frequency-domain biomes. Multiplayer where two players each control a hero on different branches of a parallel circuit. Classroom mode where teachers set a target circuit and students build it on the canvas.

Built With

Share this project:

Updates