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!
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.
$ git clone https://github.com/lets-all-be-stupid-forever/circuit-artist... Cloning into 'circuit-artist'... remote: Enumerating objects: 326, done. remote: Counting objects: 100% (326/326), done. remote: Compressing objects: 100% (269/269), done. remote: Total 326 (delta 59), reused 306 (delta 52), pack-reused 0 (from 0) Receiving objects: 100% (326/326), 1.41 MiB | 7.70 MiB/s, done. Resolving deltas: 100% (59/59), done. $ cd circuit-artist/ $ mkdir build $ cd build/ $ cmake . CMake Warning: Ignoring extra path from command line:
"."
CMake Error: The source directory "/home/chris_ji/code/circuit-artist/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
$ cmake ..
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:17 (add_subdirectory):
The source directory /home/chris_ji/code/circuit-artist/third_party/raylib
does not contain a CMakeLists.txt file.
CMake Error at CMakeLists.txt:18 (add_subdirectory):
The source directory /home/chris_ji/code/circuit-artist/third_party/nativefiledialog-extended
does not contain a CMakeLists.txt file.
-- Configuring incomplete, errors occurred!
$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.