显示HN:电路艺术家 – 带传播动画和倒带功能的电路模拟器
Show HN: Circuit Artist – Circuit simulator with propagation animation, rewind

原始链接: https://github.com/lets-all-be-stupid-forever/circuit-artist

## 电路艺术家:数字逻辑游乐场 电路艺术家是一款专注于直观学习和逼真模拟的数字逻辑电路绘图游戏。重大更新引入了可变延迟、事件驱动的模拟引擎,该引擎根据线路拓扑和扇出精确地模拟信号传播——使用Elmore延迟计算。玩家可以*看到*这种传播,表现为视觉辉光,有助于理解。 主要功能包括:基于图层的设计(具有不同的传播速度)、可暂停/倒带的模拟用于调试,以及循序渐进的学习模式。物品栏系统允许蓝图保存和重用,增加了进度元素。 模拟现在允许玩家通过利用延迟来创建时钟,并引入了基本的能效指标以及速度。音效提供电路活动反馈。该项目是开源的(GPLv3),可在GitHub上找到:[https://github.com/lets-all-be-stupid-forever/circuit-artist](https://github.com/lets-all-be-stupid-forever/circuit-artist)。

## 电路艺术家:像素艺术电路模拟器 《电路艺术家》是一款独特的游戏,玩家使用像素艺术界面设计数字电路,让人联想到油漆,但带有导线和NAND门。开发者重建了模拟引擎,以解决之前基于单位延迟系统的局限性。新的引擎采用基于Elmore延迟的可变延迟、事件驱动模拟——这意味着导线长度和连接会影响信号传播速度,为电路设计增加了空间元素。 这使得能够实时可视化信号流动,并带有发光效果,还包括时间回溯等调试功能。游戏具有用于布线的图层和用于教学电路构建的战役,并计划支持Steam创意工坊,用于用户创建内容。 早期反馈称赞其直观的界面、精美的可视化效果和教育潜力,并建议在未来更新中添加电阻和电容等组件。源代码已在GitHub上公开,游戏可在Steam上购买。
相关文章

原文

Circuit Artist is a digital logic circuit drawing game.

  • 🔧 I've reworked the simulation engine to use a variable-delay event-driven simulation taking into account the topology of the wires to create a distance / propagation delay map based on elmore delay calculation for trees. It also takes into account fanout nands, so you have things like the higher the fanout the higher the delay, trees propagating differently then "lines" etc, to a have a more "accurate" simulation so players can play/develop intuition for real circuit design (sort of).

  • 🔍 The distances are mapped to pixels so players can visualize the wires "propagating" with glow, which I find cool and helps understand how things work. Rendering is done in real time with some shaders.

  • 🕤 I've also added a delta-based design on the simulation to allow simulation to be paused and controlled back and forth so players can interact with it. Particularly useful for debugging "cyclic" circuits.

  • 🍰 Players can also add layers as in photoshop, (up to 3 layers), and layer wires can connect with neighboor layers, although NANDs are only allowed on the bottom layer. Wires on upper layers have a higher "propagation" speed.

  • 🏆 Added a lower-pace campaign system so new users can solve problems little by little and learn concepts gradually, testing/refining solutions and tracking progress. It's still on early days, plan to put more stuff later.

  • 👜 I've added an inventory-like UI for placing blueprints so players can build it's library and re-use it, which also adds a new progression dimension to the game.

  • 🔉 Added a bit of sound to circuits, so when they simulate they will "beep" in function of the circuit activity.

  • :godmode: The simulation also is no longer "immediate", players can build their own clocks on sandbox mode by just exploring the delay mechanism. Clocked/Synchronous components won't work for free, need to make them efficient, adding an extra challenge/fun dimension to the game.

  • 🚧 There's also a simplified energy calculation formula/metric to explore circuit energy efficiency vs speed (even though its still not fully developed yet in the game).

  • git clone https://github.com/lets-all-be-stupid-forever/circuit-artist.git
    cd circuit-artist/
    git submodule init
    git submodule update
    mkdir build
    cd build/
    cmake ..
    make
    

    GPLv3. See LICENSE file. For dependencies, see third_party folder.

    联系我们 contact @ memedata.com