
DLS, the digital logic simulator game - jsnell
https://makingartstudios.itch.io/dls
======
userbinator
One of my criteria for assessing a logic simulator is whether it can simulate
something nontrivial like an entire CPU, so I was pleased to see there's a
6502 here...

[https://github.com/jdryg/dls-
schematics/tree/master/6502](https://github.com/jdryg/dls-
schematics/tree/master/6502)

...but it seems to be only a 6502-based system showing that you can use a 6502
as an opaque component, and isn't actually simulating its logic with the
siulator. On the other hand, the 4004 here is mostly the real deal:

[https://github.com/jdryg/dls-
schematics/tree/master/i4004](https://github.com/jdryg/dls-
schematics/tree/master/i4004)

~~~
jdryg
The i4004 was the first real thing I tried to simulate in DLS (I thought it
would be easy since it's only a 4-bit CPU... :)). As you said, it's _mostly_
the real deal, since it's missing some components. That's why I added
scripting to see if it can make the whole process a bit simpler.

When scripting was implemented, I didn't want to redo the i4004, that's why I
started the 6502. And since kernel and basic ROMs were available online, I
thought of adding a display to see if I can get some output.

AFAICT, building an entire CPU out of logic gates in DLS is feasible. I just
don't have all the time required to do it, that's why I'm currently building
(reusable?) parts of a CPU and document the process in the blog. It will be
complete some day, but not anytime soon :)

------
cottonseed
When I was a kid I played a game on the Apple ][ that years later I realized
was secretly an introduction to digital design with propagation delay. In the
game, little sparks/pulses would travel down wires, and there were various
objects (primitive elements) that would manipulate the pulses (and gates, or
gates, delays, relays, etc.) If memory serves, each level had a set of pulses
that needed to be generated to progress to the next level. I have no idea what
it was called and I've looked for it occasionally without success. Anyone know
what I'm talking about?

~~~
Morpholemew
Sounds like it could have been
[https://en.wikipedia.org/wiki/Rocky%27s_Boots](https://en.wikipedia.org/wiki/Rocky%27s_Boots)
(I played the Commodore 64 version).

~~~
veli_joza
I think the successor Robot Odyssey
([https://en.wikipedia.org/wiki/Robot_Odyssey](https://en.wikipedia.org/wiki/Robot_Odyssey))
was much more impressive. Same digital logic was used to control robots and
solve physical puzzles.

------
jsnell
The author also has a great series of blog posts where he's designing various
CPU components in the game (so far the ALU and the register file):

[http://dls.makingartstudios.com/categories/circuits/index.ht...](http://dls.makingartstudios.com/categories/circuits/index.html)

------
qwertyuiop924
Well, I'm already obsessed with TIS-100. I fail to see how this could be any
harder. And then I remember why I hate EE. After all these years, nothing
makes any sense, still. Maybe this game will help.

By the way, from the look of it, if you like this game at all, you will love
TIS-100, and should totally go buy it.

~~~
hcs
Zach Barth (maker of TIS-100) did a integrated circuit design game in Flash
back in 2009 which might interest you:

[http://www.zachtronics.com/kohctpyktop-engineer-of-the-
peopl...](http://www.zachtronics.com/kohctpyktop-engineer-of-the-people/)

It's somewhat more of a game than DLS is at the moment, though working at a
much lower level.

~~~
qwertyuiop924
I heard that Kohctpyktop was Zach's most brutal game. And between The Guild of
Alchemical Engineering, SpaceChem, and TIS-100, that's saying something. The
phase: "I can't beat the last level of SpaceChem," has become almost memetic
in nature. IIRC, Zach himself couldn't beat it.

------
chungy
I do rather enjoy the "Name your price" mechanism, to where I can get the game
for free to at least get a demo, and decide that I want to pay for it later
(or if I throw it aside 30 minutes later -- no monetary commitment lost).

I do wonder though, if it might be worth more to just have plain download
links with a Donation button. Perhaps someone's already done a study on this.
Are people more likely to pay money with the download links behind the "name
your price" dialog?

On a side note: the Linux Zip file is a little bit poorly constructed. For
Linux, it's usually poor form to not be wrapped up in a dedicated directory.
Additionally, the binary isn't marked executable inside the Zip, making the
user do it manually instead.

~~~
veli_joza
I think the donation button would only work if it was integrated into game
(for example a reminder on main menu). Otherwise it would be very difficult to
convert the user who is already playing the game for free.

------
etatoby
My 4¢:

1\. I wouldn't call it a game unless it has a gaming element. Then, I wouldn't
value it for its simulation capabilities as much as for its gaming properties
(entertaining, addictive, not too easy, not too hard? etc.)

The reasoning is that if you need a logic gate schematic capture & simulator
there are tons of professional ones that can be had for free, both open source
and commercial.

2\. Also, I wouldn't call it an educational game unless it actually teaches
the concepts of EE, but judging from the website it doesn't seem to do so.
Even the video example has no audio (unless it's a problem on my part) so you
either know all the concepts already, in which case this game has no use for
you, or you are left scratching your head more often than not. (Why does that
rising edge detector thing have 3 NOT gates in series? Why not 1 or 5? and so
on.)

3\. Manually drawing wires gets tedious _very_ fast. There are many reasons
why professionals use HDLs almost exclusively nowadays, but as a hobbyist I
can already tell that not having to draw wires (and keeping them ordered after
every change) is certainly one of them.

4\. The graphics are fine for an educational circuit simulator, but completely
miss the mark if this is intended as a game. Look at SpaceChem for an example
of a circuit-like game done right. I would love to see a game like that,
except based on logic ports instead of automatons.

Hope this is taken as constructive criticism, from someone who is potentially
interested in this kind game. Keep up the good work!

~~~
1gn1t10n
Concerning point one, could you please list the alternate software you had in
mind? Especially the open source ones. Thanks!

~~~
nitrogen
Qucs is the one I've heard of.

[https://github.com/Qucs/qucs/](https://github.com/Qucs/qucs/)

------
RBerenguel
I remember having a similar "tool" when I was a kid (I'm pretty sure it was on
MS-DOS, and I suspect it wasn't actually a game but I'm not completely sure,
this was a long time ago). Had many kinds of gates, 8-leds, blinkers. I still
remember the thrill of building an adder out of simpler gates, only knowing
that I wanted something that could "add".

~~~
gavinpc
Was it called "Rocky's Boots"? That's what this brought to mind. You could
take components from room to room to solve puzzles. As I recall it was kind of
self-documenting, in that you just had to figure out from examples what
problem they were posing.

 _edit_ see
[https://news.ycombinator.com/item?id=12239171](https://news.ycombinator.com/item?id=12239171)

~~~
RBerenguel
No, I vaguely recall it being "Electronic Workbench", but googling for it only
brings Windows versions, it was definitely a MS-DOS tool. Maybe I can still
find the disks somewhere

------
emmanueloga_
A bit late but I wanted to mention Logic Friday [1]. The main feature is the
generation of simplified circuits that produce the same logic output that a
given input. Logic minimization is a hard problem to solve, LF uses espresso
[2] to perform it.

1: [http://sontrak.com/screenshots.html](http://sontrak.com/screenshots.html)
2:
[https://en.wikipedia.org/wiki/Espresso_heuristic_logic_minim...](https://en.wikipedia.org/wiki/Espresso_heuristic_logic_minimizer)

------
sriram_malhar
Looks really nice. What is the gaming component?

I use iCircuit app all the time on my mac, which is a variation on Paul
Falstad's circuit simulator
([http://www.falstad.com/circuit/](http://www.falstad.com/circuit/)).

~~~
jdryg
Thanks!

There are currently no objectives or any game element in DLS. I have some
ideas on how this can be turned into a game. Haven't decided which of them
will be feasible to implement and be (somewhat) fun at the same time.

------
wott
Pfff... for the last weeks I was considering designing a game like this (or
more exactly, like this may become if the goal is to produce certain
waveforms, light up certain LEDs at certain time, power up various stuff in a
given order, etc.) and was about to start.

Caramba! Missed again!

~~~
jdryg
You should do it! I doubt I'll decide how to turn DLS into an actual game
sooner than you are able to build yours :)

One of my ideas is similar to what you describe but with more complex cases (I
can't think of anything simple that will make sense). E.g. controlling traffic
lights.

------
technomancy
Looks like fun. I wish I could play it, but after manually chmodding and
avoiding the tarbomb I get "./DLS: /usr/lib/x86_64-linux-gnu/libstdc++.so.6:
version `GLIBCXX_3.4.21' not found (required by ./DLS)" when I try to run on
64-bit Debian Jessie and "-bash: ./DLS: No such file or directory" when I try
to run the other version for GCC 4.9.2. (I have GCC 4.9.3.)

~~~
jdryg
For the first error (`GLIBCXX_3.4.21' not found) try the other Linux version
(the one marked as GCC 4.9.3). This was the reason I uploaded it.

For the second error (at least on Ubuntu 14.04) it seems that some dependency
is missing but ldd doesn't report it. Under Ubuntu 14.04 ldd maps /lib/ld-
linux-x86-64.so.2 to /lib64/ld-linux-x86-64.so.2 but when you try loading the
executable this doesn't happen. If this is the case for you, try creating a
symlink:

ln -s /lib64/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2

Hope that helps.

~~~
technomancy
Interesting; how is it possible for `ldd` to report the dependency resolution
incorrectly?

Is it possible to fix this with `LD_LIBRARY_PATH`? I would like to avoid
running one-off commands on my /lib directory that I don't understand if
possible.

------
Veedrac
A friend of mine made SmartSim, which is very similar. I believe it's in the
Raspberry Pi repos.

[http://smartsim.org.uk/](http://smartsim.org.uk/)

See also the examples page for some fun stuff, including a 16 Bit One
Instruction Set Computer.

[http://smartsim.org.uk/index.php?page=examples](http://smartsim.org.uk/index.php?page=examples)

------
Zekio
Actually looks like a great game/tool to teach people with rather than using
paper examples and asking the teacher if it is correct or not

------
gameDoc
Another software that employs some of the video game technology such as 3D
graphics, animations, and visual effects to let one play with analog and
digital electronic circuits is
[http://www.electricVLab.com](http://www.electricVLab.com).

------
timthorn
A Raspberry Pi port would be /really/ valued.

~~~
jdryg
It's at the bottom of my looong TODO list. Hope to find some time to try it
out. Don't know if and how it'll work though.

------
zokier
It sure looks like a digital logic simulator, but I don't really see any game
elements/mechanics in there?

~~~
Zekio
Guessing he will be adding modes like in kerbal space program which also
started out as sandbox only

