• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

TIS-100 | Programming puzzle game from SpaceChem dev & GAF's 77th Best GOTY 2015

KDR_11k

Member
Damn, I just realized that you can use an adjacent module as a register that can be added and subtracted by just putting mov any,acc \n mov acc,last in it (or can you read and write to one port in the same cycle?) instead of using my current double-the-input-signal approach.
 

KDR_11k

Member
One difference is that Spacechem makes you visualize where a large molecule is at a given step of the program so you have to keep large areas in mind and check for overlaps, TIO doesn't have traps like causing an abort because the molecule clipped something like 4 blocks away from the execution path.

I wonder if a later task will be a multiply operation, in that case I'm going to miss bit ops.
 

F0NZ

Member
Picked this up just from my prior experience with SpaceChem. I am loving it. I've spent the better half of my morning trying to solve some of these puzzles, and the other half of the morning optimizing some of my code. As you've gathered, I'm not being very productive at work today :)
 

Toma

Let me show you through these halls, my friend, where treasures of indie gaming await...
Picked this up just from my prior experience with SpaceChem. I am loving it. I've spent the better half of my morning trying to solve some of these puzzles, and the other half of the morning optimizing some of my code. As you've gathered, I'm not being very productive at work today :)

The game was very dangerous to my productivity as well. Thankfully, there was something I needed to do early in the morning so I was forced to stop playing and I managed to not start it up again since.
 

Antialias

Member
I really like how this game forces you to make do with even less than SpaceChem and Infinifactory. This must be what coding for PS3 feels like. It's great that you can have instructions like 'move right right' that are actually super useful.

Interesting that Notch's project based on assembly coding fell through but Zachtronics' one has been released. Kinda the opposite of the Infiniminer -> Minecraft situation.
 

Toma

Let me show you through these halls, my friend, where treasures of indie gaming await...
You think this will get discounted lower during the Summer Sale or would it be fine to pick up it now?

Recently released and still in EA, I wouldnt bet on a sale, but...who knows. The game is worth it and I'll gladly throw all my support moneys at Zach, so I didnt mind either way.
 

KDR_11k

Member
So one guy on my friend list has some absurdly low cycle counts, e.g. 27 on sequence peak or 182 on Prime Detector (compared to over 5k on the divider), is there some super cool application of stream processing I'm missing or is he just cheesing it by hardcoding the solution?
 

Blizzard

Banned
So one guy on my friend list has some absurdly low cycle counts, e.g. 27 on sequence peak or 182 on Prime Detector (compared to over 5k on the divider), is there some super cool application of stream processing I'm missing or is he just cheesing it by hardcoding the solution?
That reminds me of a certain college class (with a professor I liked who later died of some awful disease, rest in peace). We had some assembly language, maybe MIPS, that was tailored for the class. We were given a special piece of software that let us do calls for higher-level things like "move [whatever] direction in a maze" or maybe "read user input".

The assignments were graded on things like how many instructions were used, or how fast it ran, or whatever. We ended up with things like you describe, where people would figure out really clever ways to try to get over 100% grade for a particular assignment.

One half funny, half annoying thing was that the professor would make what he considered an "obvious" baseline solution or whatever that we were supposed to at least match. Due to his experience, sometimes even that baseline would appear obnoxiously hard to reach, and we were like, what's so obvious about this to him? :p
 
One difference is that Spacechem makes you visualize where a large molecule is at a given step of the program so you have to keep large areas in mind and check for overlaps, TIO doesn't have traps like causing an abort because the molecule clipped something like 4 blocks away from the execution path.

I wonder if a later task will be a multiply operation, in that case I'm going to miss bit ops.

Yup, just got to the multiplier. I should go to bed.
 

Spoo

Member
Only done the first 4, but anyone is welcome to add me if they want to compare metrics I guess: I'm Spoogeist on steam.
 

Vintage

Member
Looks interesting, is there any gameplay videos showing how the game is played? Trailer is kinda terrible, doesn't explain anything.
 

itxaka

Defeatist
Bougth yesterday, played a couple of levels.

It's fucking good. If you like programming I guess it's easier, but everybody should be on.

Hint: when you get data from an input you don't need to store it on acc, you can move it directly to the next bank! I was storing all the inputs into acc before moving it to the next bank instead of doing mov up, left
 

Spoo

Member
Looks interesting, is there any gameplay videos showing how the game is played? Trailer is kinda terrible, doesn't explain anything.

I don't know about any trailers or instructional videos, but I can give a "brief-ish" explanation, anyway.

Basically, the game is about taking 1 or more input lists (like say [1,2,3,4]), and -- through the use of programmable "units" which run in parallel -- transform that data according to some rule, and sending them through your system to 1 or more output lists.

So for example, one program has you take in a list of numbers, and double them, outputting the result. So if the list is [1,2,3,4], then as data "flows" through your units, it winds up being outputted as [2,3,6,8].

Because each unit can run in parallel, however, there are potentially many solutions to even the simplest puzzle. The game has no formal metric as of yet for "winning", but it can compare 3 important statistics (and even allows you to write 3 individual programs per puzzle to associate, I imagine, with these statistics): Cycle count, Node count, and Instruction count. Cycle count is how many 'ticks' it took the system to fully execute the program over time. Node count is how many "units" you needed to code up a solution. And instruction count is how many instructions you used to complete the program. The game nicely compares your lowest values in these three categories to people on your friends list so you can so how dum--er, how much work you have to do to put them in their place ;)

Minimizing one of these categories often comes at a cost of another, or two. For example, minimizing cycle counts requires you to think in "parallel" with your units -- try to get the data to flow through your system faster, minimize the amount of operations you have to do, and spread the work evenly. If you can do something independently across many nodes, and then later "sync" the work up as you push it out to the output list, you're going to have a lower cycle count. In the process, you probably used more nodes (units) and more code to get the job done. Again, there's no formal metric for success really, so feel free to try to minimize on all three categories by writing 3 separate programs to minimize each.

The game looks on the surface to be terrifyingly complex. In reality, some of the problems can be tough when you try to minimize the work, but the actual "code" that you write tends to be usually simple if your goal is simply to come up with a working solution. The game uses a very simple reduced instruction set architecture which is pretty much limited to passing data through the units, syncing (blocking until input is available, and moving it somewhere), comparisons (>, <, =), and has 2 registers (places to store data/memory). Only one of which allows direct read/write operations. Also, there are ways to branch (using a variety of jump commands and labels). If none of that makes any sense, then it's probably going to take a little bit of time to get your bearings if you've never done any kind of assembly -- but it's far from impossible and, in my opinion, is a really cool way to learn it, and in a parallel programming environment too!

Having some familiarity with programming in general will help a *lot*. If you've never programmed before, it's going to be a tough game to play right now until there is better instructional videos or something, but it's not impossible.

I'm sure someone has already posted what the exact operations are in the game that you can do, so I won't go over them, but when you get in the game the nice thing is you can try them all out, and the game does an excellent job of actually showing you the data that is flowing through the system at any one point during execution -- this isn't just useful for debugging, it's useful for learning, too.

Anyone who has even a passing interest in the game should shell out the cash for it. It's cheap, fun, and a cool interactive way to learn basic assembly, parallel programming ideas, and -- oddly enough -- graph theory.
 

Spoo

Member
I decided to make a video about this game, where I use the first puzzle to sort of explain the mechanics, and how to do some basic stuff in it. (I cover a lot of the operations, so if you read the manual and found it confusing, or you don't know much about assembly but know basic programming concepts, it should make some sense, or at least get you started). Video isn't aimed at anyone in particular, so might not be enough info, or too much. It runs 30 minutes or so because I start doing some other examples, so if you get bored, or you feel like you got the gist of it, by all means don't feel obligated to watch the whole thing.

Click here to watch (spoiler for first puzzle)

Note: I started with the intention of not "spoiling" the first puzzle, but sadly I end up doing it anyway because I don't think it's a good explanation otherwise. If you are concerned about wasting cash on the game because of what it is, or how it works, you probably won't mind. If you want to do it on your own, don't watch too much of the video, I guess. Also, the video is kind of unplanned, and it's like 4am here, so I make a mistake or two, but I correct myself as I go. Sorry if my voice is annoying :\
 

Window

Member
Haven't played the game but from the description I think people should really give micro-controller simulators a try and do some projects if they enjoy this.
 
I love how in Zachtronics games you beat a level and feel badass, then look at the leaderboard and feel humbled, then look at the next puzzle and feel despair, all in a span of like fifteen seconds.
 

KKRT00

Member
Bought it.
I have no idea what i'm doing :) I've just printed 'manual', because game asked me to do it :p

If i wont figure out how to start, i'll definitely use Your video Spoo, so thanks in advance :)

---
First segment completed, by simple brute forcing :)
MOV [direction], ACC
MOV ACC, [direction]

No i can watch video by Spoo without spoiling myself, i think it at least :)

----

How do You check global leaderboards?
Or is it only friendlist based? If yes, this is my steamid - http://steamcommunity.com/id/kkrt00
 

LuffyZoro

Member
Seeing this made me want to get back into SpaceChem. Only problem is, it's been long enough that I can't solve the level I was stuck on, but I don't want to go back and redo previous levels because I don't want to delete my beautiful solutions.
 

jvm

Gamasutra.
Bought it.
I have no idea what i'm doing :) I've just printed 'manual', because game asked me to do it :p

If i wont figure out how to start, i'll definitely use Your video Spoo, so thanks in advance :)

---
First segment completed, by simple brute forcing :)
MOV [direction], ACC
MOV ACC, [direction]

No i can watch video by Spoo without spoiling myself, i think it at least :)

----

How do You check global leaderboards?
Or is it only friendlist based? If yes, this is my steamid - http://steamcommunity.com/id/kkrt00
You can also:
MOVE [direction 1], [direction 2]
... If that's the one in thinking about.

I did the same thing you did to start with, then optimized.
 

Spoo

Member
If i wont figure out how to start, i'll definitely use Your video Spoo, so thanks in advance :)

Thanks :) Hope you and others find it remotely useful. And congrats on on solving the first one -- it gets more and more fun. I'd be playing it right now if I had more time. I tend to just get one done per day, since I don't have that much time and I usually like to spend some of it just optimizing various approaches. You should add me on Steam so I have more peeps to compare with (just 1 of my friends is playing right now).

edit: I talk about this in the video a bit, but a common thing you'll start doing is branching in your code. You might have something like:

(putting in spoilers if you don't want to see how to do a branch in TIS)

MOV UP, ACC // store up input into ACC
JGZ GT // jump to GT if ACC > 0
MOV ACC, LEFT // move ACC left if ACC > 0
JMP DONE // skip over 'else' condition
GT: MOV ACC, RIGHT // move ACC right if ACC <= 0
DONE: NOP // Does nothing. Just here to end the if/else

I started doing that, but realized that the last instruction is a waste of time (I use it in the video to show how it can be used). A NOP is still an instruction, similar to ADD NIL. To avoid that, you can rewrite the code like so:

MOV UP, ACC
JGZ GT
MOV ACC, LEFT
JRO -3
GT: MOV ACC, RIGHT

It's less code, avoids the NOP, and will decrease your cycle count (possibly considerably if you use similar code in multiple nodes). The single greatest thing you can do to minimize your cycles, though, is to always evenly distribute your work, and to have as much throughout as possible (if you can let data flow through the machine and it doesn't upset order, keep it moving before your code becomes linear). Hope that's a useful trick for some of you.
 

mercviper

Member
Added a bunch of people here for score comparisons. I'm on the multiplier level right now. My cycle score keeps moving further and further away from the average :<
 

KKRT00

Member
You can also:
MOVE [direction 1], [direction 2]
... If that's the one in thinking about.

I did the same thing you did to start with, then optimized.

Yeah, i know now :) I thought that You always had to use register.

----
Yeah, i watched Your video :) The language is pretty simple, but i need to finish reading manual for additional commands.
I'll definitely spend more time on this game today :)
 
Well, I cleared prime detector with 365858 cycles because I'm apparently too stubborn to learn how to use the stack memory node. 31 instruction count though!
 

mercviper

Member
Well, I cleared prime detector with 365858 cycles because I'm apparently too stubborn to learn how to use the stack memory node. 31 instruction count though!
Lol. Thats the next puzzle for me. I saw the global graph had cycle counts in the 100k+ range and decided I needed to stop for the night. I'm still trying to think of a better way to determine prime besides using modulo for every number under the sun before moving forward.

Edit: thinking on it a bit further I can use square numbers to determine the range of numbers to be multiplied, like I shouldn't be testing past multiples of 32 because 32 squared is 1024
 

jvm

Gamasutra.
Lol. Thats the next puzzle for me. I saw the global graph had cycle counts in the 100k+ range and decided I needed to stop for the night. I'm still trying to think of a better way to determine prime besides using modulo for every number under the sun before moving forward.

Edit: thinking on it a bit further I can use square numbers to determine the range of numbers to be multiplied, like I shouldn't be testing past multiples of 32 because 32 squared is 1024
Sieve of Erasthones, yes? Might have the spelling wrong.
 

mercviper

Member
Sieve of Erasthones, yes? Might have the spelling wrong.
Yeah my current thought is to run the final number through the sieve and see if it falls through or not. Will be really cycle expensive to check though and I think there must be a better way
 
Sieve of Erasthones, yes? Might have the spelling wrong.

The sieve of Eratosthenes requires keeping your list of numbers in memory, and memory is not exactly the TIS-100's strong suit :(

There are only 168 primes between 1 and 999, I was thinking of trying to encode them somehow (RLE on the deltas?) but couldn't come up with a good way. Maybe after a sleep.
 

Toma

Let me show you through these halls, my friend, where treasures of indie gaming await...
I reached the visualization module levels yesterday. Really, really cool, I just love which varied challenges Zachtronics throws at me in those games <3
 
:O

s05SceX.gif
 

Window

Member
Can you recommend some or where to read up on these?

Sorry for the late reply. I have only ever used a simulator for the HCS12 which came with an embedded systems development IDE (Codewarrior) for university work. I remember looking around for something to play with on my own (but never got around to it) and found this book at the time which seemed really good and may be userful to you. It seems to use a free IDE (MPLAB) to walk you through typical embedded systems programming concepts using 8 bit PIC microcontrollers. I recommend a book as I personally find it a little intimidating to start to learn something by just reading data sheets without a clear goal in mind.
 

Overside

Banned
TIS-100 is Awesome. Reminds me of Guilherme S. Töws' free ware HAX:CORP....

I wonder if I can still find it, people who enjoy one will likely enjoy the other.

AH! Here, works straight from the browser, I hope some people here get as much enjoyment out of these kinds of games as I do:


http://zarat.us/tra/haxcorp/
 
Top Bottom