[HN Gopher] Show HN: Circuit Artist - Circuit simulator with pro...
       ___________________________________________________________________
        
       Show HN: Circuit Artist - Circuit simulator with propagation
       animation, rewind
        
       Hello,  Circuit Artist is a game about drawing digital circuits as
       pixel art -- like MS Paint, but pixels are wires and little
       triangles are NANDs. Hit play and the simulation runs in real time.
       It's fully white-box: every wire's state is visible.  I launched it
       last year with a unit-delay simulation that ran until convergence
       on each update. It worked, but I realized it had some fundamental
       problems:  (i) It hid what was actually happening. Players couldn't
       tell the difference between a ripple carry adder and a look-ahead
       adder -- everything just resolved instantly.  (ii) Design bugs
       became "game bugs." When players had non-converging wires (like A =
       not(A)), the game couldn't explain why or where the error was.
       (iii) Layout didn't matter. A NAND on one side of the map would
       instantly propagate to the opposite side, making spatial decisions
       meaningless. Unit delay probably works better for schematic-based
       simulators like Logisim, not a layout-focused game like this.  (iv)
       Propagation visualization couldn't be added on top of the unit-
       delay engine -- there was no notion of direction or distance.  So I
       rebuilt the engine with variable-delay event-based simulation using
       an adaptation of Elmore delay. The delay for each wire depends on
       distance and fanout -- longer wires are slower, higher fanout adds
       delay, branching wires are faster.  For the implementation: I
       compute Elmore delay over wire trees. Each pixel has resistance and
       capacitance, with NAND inputs as nodes to account for fanout. For
       non-tree wire graphs, I build a Dijkstra-based spanning tree
       (driver as root) and interpolate for edges outside the tree. I
       calculate the delay for each node and project it back to the image
       so every pixel has a distance.  This lets me animate propagation
       with a glow effect during simulation. The shader knows when each
       wire was triggered, the current time, and the Elmore distance of
       each pixel, so it resolves state per-pixel in real time.  On top of
       that:  - Time rewind: the simulation is now delta-based, so players
       can freeze and scrub backwards to debug. Super useful for cyclic
       circuits.  - Layers: since timing matters now, I added up to 3
       layers. NANDs only go on the bottom layer, upper layers propagate
       faster (lower capacitance). Lets you route wires above dense NAND
       areas.  The game has a campaign for learning from scratch, though
       it's still incomplete and in progress. I'm working toward Steam
       Workshop support so people can create their own campaigns to teach
       different concepts or cover more advanced topics.  GitHub (full
       source): https://github.com/lets-all-be-stupid-forever/circuit-
       artist  Steam:
       https://store.steampowered.com/app/3139580/Circuit_Artist/
        
       Author : rafinha
       Score  : 120 points
       Date   : 2025-12-31 16:12 UTC (5 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | simgt wrote:
       | What a gem. That seems super fun and I love the Paint aesthetic
       | :)
        
         | rafinha wrote:
         | Thanks!
        
       | boobsbr wrote:
       | Holy moly.
        
       | goku12 wrote:
       | Beautiful work on an interesting subject!
        
       | zamadatix wrote:
       | This seems awesome! I wish this had come out a few weeks ago so I
       | had time to tinker with it waiting for the Turing Complete
       | rewrite. I particularly like the implementation of Elmore delay
       | to give some meaning to the spatial layout.
       | 
       | I'm not 100% sold on the bitmap editing style of circuit layout
       | vs something like the automatic wire pathing in Turing Complete
       | though. It's something I'll need to play with to get a real
       | opinion on though.
       | 
       | Purchased to have some fun with this weekend. Thanks for
       | publishing the source as well!
        
         | its-summertime wrote:
         | Disclaimer: I've only played before the release of the
         | propagation.
         | 
         | Across all the Zach-like and other games I've played around
         | with, the wire management in Circuit Artist I'd say feels very
         | fair and intuitive, and not obstructive to gameplay.
         | 
         | The developer is very accepting of feedback and it showed up a
         | lot, with quality of life features showing up constantly (e.g.
         | being able to automatically draw bus lines, with corners et
         | al).
         | 
         | Worst case, you can copy the circuit into your favorite image
         | editor, make edits there, and paste it back into the game (Or
         | use Netpbm/other software to programmatically generate
         | circuits) (Or make a library of circuits to copy from using any
         | other app that can handle images).
         | 
         | The flexibility of the idea of MS Paint + circuit is taken to
         | its complete logical conclusion.
        
       | jacquesm wrote:
       | What a beautiful visualization. I will try this on my electronics
       | loving child, see if it takes.
       | 
       | If at all possible: add resistors and capacitors. With those two
       | added you can make many more interesting circuits (Schmitt
       | triggers, a-stable stuff).
        
         | rafinha wrote:
         | Hi, thanks! Today the game is focused on digital logic, It
         | would be fun to put resistors, capacitors or maybe transistors,
         | maybe as a mod, but the algorithm would be a little different,
         | would need analog simulation which I'm less familiar with.
         | 
         | Would probably be slower but doable, fun mod for the future!
        
           | jacquesm wrote:
           | Nand gates you already have and they can take the place of
           | transistors for now, so C's and R's would bring the most
           | options at once. And LEDs, but those should be very easy.
        
           | atroon wrote:
           | If you are mapping the lines where each pixel has resistance
           | and capacitance (presumably quite small values) could you add
           | a new pixel type with editable resistance / capacitance and
           | hide it behind a graphic of the schematic representation
           | (i.e. the zigzag of a resistor like --\/\/\\-- or capacitor
           | like --|(-- ?
           | 
           | Your current algorithm would need to be able to accept a
           | wider range of values but it seems like it would work from a
           | math standpoint.
        
       | pjc50 wrote:
       | Having Elmore delay in this is fantastic - many "proper"
       | educational simulators don't bother with this important aspect.
       | It also forces people to deal with fanout, as you say.
       | 
       | Plus it looks really cool with the neon.
        
       | random_duck wrote:
       | Oh wow, this is such a great project! I love how we can elegantly
       | simulate propagation <3 Congratulations, I will defiantly
       | purchase it from stream just to help it's development.
        
         | random_duck wrote:
         | Also, I will strategically wait until the sale is over because
         | this deserves full price.
        
       | ckmiller wrote:
       | I've written simulators as a career for more than a decade, and
       | I'm stunned at what a good job you've done. The simulation engine
       | is excellent and the visualization is prettier (and more
       | intuitive!) than any I've ever seen.
        
       | NwtnsMthd wrote:
       | Love the aesthetic, even more, that you published the source! I
       | bought a copy on Steam, thank you for your work!
       | 
       | Any plans to add more advanced campaigns, say, to build up to a
       | simple processor?
        
         | rafinha wrote:
         | Hi thanks! Sure, certainly! I also want to eventually add some
         | physics-based levels for fun, with like a box2D sim interacting
         | with the circuits (with N circuit ticks = 1 box2D "tick"), or
         | even little games on top of the circuit, but I need these
         | tutorial campaigns first otherwise the step curve is way too
         | high.
        
       | SilentM68 wrote:
       | This is nice. I wish I had something like this when was taking
       | Electronics courses. The visual component would have been very
       | helpful. Merging this with a course on electronics would be a
       | great resource.
        
       ___________________________________________________________________
       (page generated 2026-01-05 23:01 UTC)