[HN Gopher] Show HN: I made a digital circuit drawing and simula...
___________________________________________________________________
Show HN: I made a digital circuit drawing and simulation game
Inspired by games like Turing Complete/Virtual Circuit Board/Logic
World, I tried to make a mix of aseprite and wiredworld/wired-
logic, the idea being the user can build a digital circuit using a
"fullstack" pixelart creation workflow. The circuit is just an
image. The primitives are (i) connected wires which have undefined,
0 or 1 state during simulation (displayed brighter or darker in
function of the state) and (ii) NANDs, which are little pixel
triangles. During simulation the user can interact with any wire by
clicking on it, toggling its state, which is cool for messing
around when learning. The simulation uses a unit-delay event driven
algorithm. Then, on top of that there are little wire interfaces
on the left side of the image that communicate with an external
system. This external system is defined in lua and is simulated
together with the main circuit (they alternate until convergence).
By default there's a sandbox mode with a clock and a power-on-reset
signal. The user can choose other "levels", where the API change
and there are some problems to solve, from finding if a number is
multiple of 3 to solving hanoi tower to finding if a number is
prime. The idea is that if the user want to learn but not sure what
to do they can try to solve these puzzles, or they can change the
lua scripts to add their own stuff/interface for a custom project.
I've also included a small wiki (circuitopedia) with some basic
digital concepts to guide those who are new or are a bit rusty.
It's not super detailed but I guess it can at the very least
present the concepts so the user can dig further on more serious
material if they want to. I developed the game in C with raylib,
with scripting in lua/luajit. I've put the game on steam (for
windows) and released the source code on github under GPLv3.
There's also a web demo version on itch.io, even though it's a bit
laggy: https://lets-all-be-stupid-foreva.itch.io/circuit-artist-
dem... . Feedback is appreciated!
Author : rafinha
Score : 96 points
Date : 2024-09-14 22:43 UTC (1 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| madflame991 wrote:
| I tried the demo and I liked it!
|
| I would prefer if I could pick a color in a faster way than
| switching to the color picker or using the palette: maybe middle
| click or Ctrl + left-click (gimp does that). It would reduce the
| mouse travel quite a bit; sometimes I happen to have the exact
| color I want next to my cursor.
|
| I would also suggest putting the trailer on Steam. All I see is
| images in the steam carousel thing; I think the trailer being in
| the carousel would help.
| rafinha wrote:
| I'm glad you liked it :) . That's a good idea for the colors,
| I'll put it in, thanks! You're also right about the trailer,
| I'll put it there.
| amelius wrote:
| Does it have a maximum fan-out of the gates, like real gates do?
| rafinha wrote:
| I haven't thought of that. It might be cool to add something
| like that for some extra puzzle/optimisation element. I guess
| it might be useful for netlist export? thanks
| msephton wrote:
| Very cool!
| mattdeboard wrote:
| Oh wow. Awesome. I had an idea for similar game for system design
| but got bogged down trying to learn game dev. This is so cool
| cushychicken wrote:
| I think let's-all-be-stupid-forever should cut themselves a bit
| of slack - this is pretty cool.
| mkirsche wrote:
| That looks super cool.
|
| I started to build a game around my wired-logic proof of concept
| (https://github.com/martinkirsche/wired-logic) but never had time
| to finish it (the ideas are still developing in my head, tho).
|
| However I am very happy to see that publishing it, was not for
| nothing.
___________________________________________________________________
(page generated 2024-09-15 23:01 UTC)