Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Single-Instruction (Subleq) Programming Game (jaredkrinke.itch.io)
86 points by schemescape on July 30, 2023 | hide | past | favorite | 27 comments



This is a "zachlike" programming game revolving around a fictional 8-bit, single-instruction (subleq) computer [0]. If you're familiar with TIS-100, it's like that, but using a subleq-based assembly language (and only one node).

I shared this previously when I added a Steam version [1] with achievements, music, etc. (the Steam version is also free). Most recently, I added native Linux support to the Steam version, due to feedback from players wanting friend leaderboards on Linux.

The source code is on GitHub [2], in case anyone is curious (but note that it's not Open Source--I'm still deciding how to license it).

Let me know if you enjoy it!

[0] subleq is "subtract, and branch if <= 0"

[1] https://store.steampowered.com/app/2124440/SIC1/

[2] https://github.com/jaredkrinke/sic1


Oh god you just reminded me I am about 5 problems away from "completing" TIS-100. I can't recall specifically which one I was on but I ended up spending way too much time on the game overall and needed to step back and do other things :) Neatening up little sections, trying to shave a few cycles off my run-time, trying to use fewer nodes. Ridiculously addictive, I highly recommend it.

I also bought Opus Magnum because it looked fun too and was on sale, but I fear it'll grab me the same way. Luckily it's summer so I'm not inclined to play much, and when I do I'm just throwing myself repeatedly at Malenia in Elden Ring (a strategy which isn't working out v well) :-D


One curious thing I've noted about myself playing these things is that there are some complex things I figure out and have a great cycle count. Others, I can barely figure out and I have one of the worst cycle counts which don't ever improve no matter how many times I re-try it.


Many years ago, I almost completed Spacechem (only didn't do the sillicon optional level). But I can't really come back to it, because I don't have the problem-solving chops I got during the playthrough anymore.

Puzzle games (although it's true for other games as well) are hard to return to.


Most games, when I come back to them after years, I restart with a fresh save file. Usually you can power through quite a lot of it at a reasonable speed, and the bits you can't are the bits you needed to brush up on anyway.


Yeah a friend of mine was into spacechem and tbh it sounded tougher than TIS-100 from how he described it. I really like this kind of game, I just wish I had more time for them :)


I think Spacechem is not tougher than TIS-100, it's just more visual. Of all Zachtronics I enjoyed it the most, although I played only a couple levels of other games.


SpaceChem was much tougher for me. Even Zach (of Zachtronics) never beat SpaceChem, if I recall correctly.


Shenzhen IO is also really good, and probably the most similar to TIS 100


Yep, that's yet another Zachtronics game on my radar. I'm gonna come back to TIS-100 sometime after I beat Elden Ring (Autumn, perhaps, when it's not so sunny and nice outside), will do something different (Ghostrunner or Neon White, something first-person but different) and will then toss a coin between Opus Magnum and Shenzhen. Or at least that's the current plan, I'm sure someone else will send me a link to something fun-looking, and I'll get distracted and try that instead :D

They really found a wonderful niche in building these kinds of games, and seem to execute them really well.


Unless you’re primarily interested in the programming part, I’d recommend Opus Magnum. I’ve played a lot of zachlikes and Opus Magnum is my favorite. It’s mesmerizing to watch the machines run, and it’s also fun to see the ridiculous levels of optimization other people have achieved.


Exapunks is another good one with the added spice of parallelism


Haven’t had a chance to play because I’m on mobile but I have to say I love the ambiance! The green tint, the music, the sound effects, all very cool. Kudos!


Thanks! I'll admit that I only briefly used green phosphor screens at the library (many, many years ago) and I didn't know what a Yamaha DX7 was until last year, but I can at least claim to have been alive during the 80s.


If every instruction is

  subleq <a> <b> [<c>]
why does the mnemonic "subleq" have to appear? All it is saying is "do the one and only instruction on operands A, B and possibly C".

Thus:

  <a> <b> [<c>]
would be a better assembly language format.


You are correct that it’s strictly unnecessary as long as there’s some way to detect when the third address was omitted, e.g. by requiring a newline.

I left the requirement in to make it look more like typical assembly language and also as a reminder of what it’s doing (and making the distinction between “.data” a little more obvious). I also thought the tedium of typing “subleq” fit nicely into the theme of the game.

So I guess it was more of an aesthetic decision.


Hah, neat. I love esoteric programming languages and minimalist architectures. I'm going to have a very hard time pretending that I don't know this exists but I can't spare the three months long rabbit hole that I would get sucked into if I admitted that it does ;)

Good luck with this!


If, like me, you are interested in what later puzzles are like without having to work through it all, see https://github.com/jaredkrinke/sic1/blob/master/sic1/shared/...


Whoa looks nice. Assembly-like programming games (like TIS-100) is always interesting for me.

https://github.com/jaredkrinke/sic1/tree/master/sic1

Wonder if this can be easily built on Mac...


Is anyone aware of a way to build (and ideally test) for macOS without actually owning any macOS hardware?

The Linux version uses Electron and the only native code is a tiny Steam integration library that only uses C++11 functions, so it might be possible to port to macOS without too much difficulty.

Or maybe I should just find a cheap Mac Mini…

Edit to add: in case it’s not obvious, the browser version is the same, minus Steam integration (friend leaderboards, Steam Cloud).


Perhaps https://www.macstadium.com or just Google "macOs build service". Never tried them, though.


Thanks! > $3 per day is pricier than I was expecting. Maybe I can find a used Hackintosh somewhere…


Enjoying this a lot ! Possibly too much ;)


[flagged]


Never seen such a well-targeted spam attempt before on HN. I wonder if this is a human or a clever AI model.


Note that the only non-generic text is just copied from https://news.ycombinator.com/item?id=36938537


I didn't realize it was copied from another post, that makes more sense.


How was that "well-targeted"? It is barely even English...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: