Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
DuFfY
Oct 1, 2005

brace yourself
I put together a little ball catching game if anyone wants to try it.

Press Fast to start the game and move the paddle left with 4 (numpad left), right with 6 (numpad right). Catch the ball to spawn another. Miss a ball and you lose.



TIS-100 code: http://pastebin.com/60BpiyNi

Edit the value next #SPEED in the bottom right node to change the game speed.

Adbot
ADBOT LOVES YOU

Buffis
Apr 29, 2006

I paid for this
Fallen Rib
Well gently caress



With my node layout, this is surprisingly hard to fix as well for some reason :)

Deviant
Sep 26, 2003

i've forgotten all of your names.


"Well, there's the first five puzzles done. I'll just try 'sequence generator'.


:stare:

I can subtract one number from the other to determine which is greater, but that would destroy my input value?

Deviant fucked around with this message at 00:28 on Jun 7, 2015

Zteuer
Nov 8, 2009
What if there was a way to make a copy of the input value? How could you do that?

Atimo
Feb 21, 2007
Lurking since '03
Fun Shoe

Deviant posted:

"Well, there's the first five puzzles done. I'll just try 'sequence generator'.


:stare:

I can subtract one number from the other to determine which is greater, but that would destroy my input value?

SAV is your friend.

I can't figure out Signal Edge Detector to save my life.

Dr. Arbitrary
Mar 15, 2006

Bleak Gremlin
This thread is so frustrating. It feels like I'm stuck on sequence counter and there are people posting stuff like "Hey, I can't seem to figure out how to get the chess AI to perform at above an ELO of 2200, any tips?"

Deviant
Sep 26, 2003

i've forgotten all of your names.


Zteuer posted:

What if there was a way to make a copy of the input value? How could you do that?

Well, I figured out sequence generator. i just doubled each input so i could use one for comparison and the next for working. the next one is driving me nuts though

Samopsa
Nov 9, 2009

Krijgt geen speciaal kerstdiner!

Dr. Arbitrary posted:

This thread is so frustrating. It feels like I'm stuck on sequence counter and there are people posting stuff like "Hey, I can't seem to figure out how to get the chess AI to perform at above an ELO of 2200, any tips?"

It's best to divide the problem into discrete chunks. In this problem you need to do 3 things:
-> Check each input for zero, if so, output the sum and length of the sequence
-> Else, add the input to the previous input AND
-> Increment the length counter by one.
The order in which you do this does not really matter but does change your program of course.

A step further in hints (checking for zero)

I first check for zero or not in the first node. and sum in the down node. So like this:
S:MOV UP, ACC
JEZ ST
ST:#zero detected so move 0 down to stop this sequence
MOV 0, DOWN

Now, we need to do something when it's NOT zero. First of all, we need to make sure we do not run the ST part, so a JMP S should end the sequence:
S:MOV UP, ACC
JEZ ST
JMP S
ST:#zero detected so move 0 down to stop this sequence
MOV 0, DOWN

Now between JEZ ST en JMP S we can put the code that needs to be run when you get a non-zero input. See the next hint for more!


More hints (counting number of items in list)

If we want to count the number of increments, we want to ADD 1 to a register. Only at the moment the number we need to sum is in the ACC. So, we SWP it out to increment the number that's stored in BAK, and we SWP back to get our input back in ACC again.
S:MOV UP, ACC
JEZ ST
SWP
ADD 1
SWP
JMP S
ST:#zero detected so move 0 down to stop this sequence
MOV 0, DOWN

Now all we need to do is give the number we need to sum to the node down because that's where we're going to do that:
S:MOV UP, ACC
JEZ ST
SWP
ADD 1
SWP
MOV ACC, DOWN
JMP S
ST:#zero detected so move 0 down to stop this sequence
MOV 0, DOWN

One last thing to do: when we encounter a zero we want to output the length of the sequence as well, so lets output the total sum to the right in the ST part:
S:MOV UP, ACC
JEZ ST
SWP
ADD 1
SWP
MOV ACC, DOWN
JMP S
ST:#zero detected so move 0 down to stop this sequence
MOV 0, DOWN
SWP
MOV ACC, RIGHT


Last part (summing the inputs)

So we need a second node for storing the sum while waiting for the next one. It's located below the input node. We can do that by moving the current sum left, and put MOV RIGHT RIGHT in the node to the left.
We start with a sum thats equal to 0, so:
S:MOV 0, LEFT

We need to read the input and stop when we encouter a 0. At that moment we move the total sum down instead of adding something. so just like before:
S:MOV 0, LEFT
L:MOV UP, ACC
JEZ ST
#do stuff to add
JMP L
ST:MOV LEFT DOWN

Now for the adding: We just add left, and move the result left.
S:MOV 0, LEFT
L:MOV UP, ACC
JEZ ST
ADD LEFT
MOV ACC LEFT
JMP L
ST:MOV LEFT DOWN

Done! Now just put some MOV UP DOWN in the connecting nodes and you're finished.


Screenshot of my solution (easy but not good): SPOILED SOLUTION

The worst submarine
Apr 26, 2010

Manage to get Image Test Pattern 2 down to one node and Sequence Reverser to three nodes, and yet Scatter Plot eludes me. gently caress scatter plots, histograms are cooler.

DuFfY
Oct 1, 2005

brace yourself
Scatter Plot is a bitch, but it is also my favourite puzzle. A tip: Don't fall into the trap of drawing black pixels for the empty pixels in the sprites, this can bite you in the rear end when one sprite overlaps another.

Morholt
Mar 18, 2006

Contrary to popular belief, tic-tac-toe isn't purely a game of chance.
Not only did I solve this, my solution is literally off the chart :smug:


My solution, since I thought it was amusing:

I painted myself into a corner by having a central "memory" that recorded the current position in the sequence. This would go out of sync once the nodes were processing different numbers and all reading/writing to the same memory. Rather than rethink the problem I added a timer system that shut down input completely until something had been outputed.

Eliza
Feb 20, 2011

At least your solution is reliable. My solution is decently fast at 270 cycles, but only works about a fourth of the time. Since the second run has a random input, I often get edge cases my program can't handle, and I've been unsuccessful in identifying them.
I can post my program later if anyone's interested.

double riveting
Jul 5, 2013

look at them go
I'm going to ignore this entire thread until I finish the game but it's loving awesome and I don't want you guys to spoil any of it.

Edit: Okay, I peeked. This is legit pretty cool (and amusing). I like the "negative to query, positive to store" buffer, too.

Morholt posted:

Not only did I solve this, my solution is literally off the chart :smug:

double riveting fucked around with this message at 14:48 on Jun 8, 2015

Guy Axlerod
Dec 29, 2008

Eliza posted:

At least your solution is reliable. My solution is decently fast at 270 cycles, but only works about a fourth of the time. Since the second run has a random input, I often get edge cases my program can't handle, and I've been unsuccessful in identifying them.
I can post my program later if anyone's interested.

The edge case I initially had trouble with was 1, 1, 5, 4.

I've found the sandbox a good way to test edge cases, as you can enter them directly, without waiting for them to come up.

Phssthpok
Nov 7, 2004

fingers like strings of walnuts
Here's a simple, fast, reliable signal pattern detector: http://steamcommunity.com/sharedfiles/filedetails/?id=457632091

By ignoring a specific number of inputs, we can synchronize a 1-detector, a 5-detector, and a 4-detector. Once they are synchronized, they just have to behave as ANDs of each other by emitting either zero or the previous match. The result is equal to

code:
in[t]==1 && in[t+1]==5 && in[t+2]==4

Morholt
Mar 18, 2006

Contrary to popular belief, tic-tac-toe isn't purely a game of chance.
holy crap, that's so much more elegant.

Prenton
Feb 17, 2011

Ner nerr-nerrr ner
Yeah, that seems to be the "proper" way to do it. The main difficulty is on start-up, making sure everything is in phase despite 2 of 3 nodes not actually seeing any input yet.

The two ways I found round that after I got fed up with lockups:

The only real use of "ANY" I've found so far, priming them from another node: Like this

Rotate the program in the lower 2 checker nodes round, so they actually start with "wrong, emit false, wait for input"

Morholt
Mar 18, 2006

Contrary to popular belief, tic-tac-toe isn't purely a game of chance.
I love that the games business has moved to a point where a game like this can sell.

Do we know if this game will get a research net a la SpaceChem? And custom challenges so we can hold tournaments? Getting hype~

DuFfY
Oct 1, 2005

brace yourself
I made a procedurally generated game in which you have to escape from a cave. It includes collision detection with walls. Use numpad up, down, left and right to move - but wait until the cave generates before you move or it may get stuck (fixed!). Get to the bottom to escape!



TIS-100 code: http://pastebin.com/cUHPgS3w

A time limit is possible to implement, but I couldn't find a way to cram it into the remaining space (added!). You can mess with the #MAZEVARA/B/C to get different cave layouts, though some layouts will cause you to spawn inside a wall. Spawn position can be adjusted near #X and #Z in the top right node.

edit: Updated to support the removal of stack nodes from the image console sandbox changes in the latest patch. Added a time limit and more difficult cave.

DuFfY fucked around with this message at 19:42 on Jun 12, 2015

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

Prenton posted:

Yeah, that seems to be the "proper" way to do it. The main difficulty is on start-up, making sure everything is in phase despite 2 of 3 nodes not actually seeing any input yet.

The two ways I found round that after I got fed up with lockups:

The only real use of "ANY" I've found so far, priming them from another node: Like this

Rotate the program in the lower 2 checker nodes round, so they actually start with "wrong, emit false, wait for input"


What I did was just forward -10 a few times and then do the main value passing loop of mov left down or w/e.

This game is fantastic. I haven't even dove in to the later puzzles much as I keep going back to optimize my earlier ones.

shrike82
Jun 11, 2005

Just completed it including the hidden level, reminds me of my undergrad days.
Anyone that's done a systems programming class in college should have a handle on this.
On the converse, I'm genuinely curious to see how many people without a coding background can complete the game.

I hope the creators will allow for user designed puzzles in a future build.

homeless snail
Mar 14, 2007

They took out prime detector and scatter plot viewer. That's hosed up.

zedprime
Jun 9, 2007

yospos

homeless snail posted:

They took out prime detector and scatter plot viewer. That's hosed up.
Those were probably the most fun I had. If a puzzle deserved to die (or preferably be gentler with node placement) its sequence sorter.

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock

zedprime posted:

Those were probably the most fun I had. If a puzzle deserved to die (or preferably be gentler with node placement) its sequence sorter.

I think Sequence Sorter has been changed slightly - I seem to recall the lower right node was corrupted before, but now it's a normal node.

Still trying to figure out how I'm gonna solve it, though.

(I also did the new task, Signal Window Filter, without any stacks. But I kinda cheated)

zedprime
Jun 9, 2007

yospos

ymgve posted:

I think Sequence Sorter has been changed slightly - I seem to recall the lower right node was corrupted before, but now it's a normal node.

Still trying to figure out how I'm gonna solve it, though.

(I also did the new task, Signal Window Filter, without any stacks. But I kinda cheated)
I've got notes in the bottom right of one of my aborted attempts of Sequence Sorter so I don't think that's changed. If the corrupted node or top stack was anywhere else it seems like the communication pathways would open up immensely, which might defeat the authorial intent since the math is from a previous puzzle, but it'd save me from going crazy trying to sync everything.

If I had the attention span for the algebra I feel like there's a cleverer solution than what I have for Signal Window Filter but as it is its a super simple sequence of sums with an acc memory cascade. That puzzle could probably fit on the third row, if not second, of puzzles as far as brain tickling for a basic solution goes. What would you even use the stacks for in that puzzle?

e. I figured out a stack using solution for it and either my memory handling is incredibly amateur (very possible), or he needs to step up his sequence length game if we are supposed to use stacks because for n=5 it was pretty simple to cram everything in execution nodes but the memory handler seems like it'd be scalable to pretty large sequences.

zedprime fucked around with this message at 02:23 on Jun 10, 2015

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
And I finally solved Sequence Sorter. It was really hard to cram everything into place, three of my nodes have 14 instructions and two have 13 and 12 instructions respectively.

Phssthpok
Nov 7, 2004

fingers like strings of walnuts
I want to be a tessellated intelligence.

Quinton
Apr 25, 2004

zedprime posted:

Those were probably the most fun I had. If a puzzle deserved to die (or preferably be gentler with node placement) its sequence sorter.

On the comments on the update post on Steam:

zachtronics posted:

We're going to be adding custom puzzles and probably some kind of curated "bonus puzzles" section, so I'm sure that the SPV and PD puzzles will make a comeback there (and hopefully with better test cases).

The reason these puzzles got the boot is that they were much too hard and/or ambiguous for their place in the campaign, which requires players to beat most of the puzzles to beat the game. We're still in Early Access, so the campaign is not quite locked down yet.

Jet Jaguar
Feb 12, 2006

Don't touch my bags if you please, Mr Customs Man.



Zach was asking on Twitter if people wanted a Steam workshop or a way outside of that to share puzzles.

Just watched Scott Manley's video on the game. I don't think I knew that some processors didn't have an add function, just subtract. Or if I did, I forgot it.

shrike82
Jun 11, 2005

zedprime posted:

If I had the attention span for the algebra I feel like there's a cleverer solution than what I have for Signal Window Filter but as it is its a super simple sequence of sums with an acc memory cascade. That puzzle could probably fit on the third row, if not second, of puzzles as far as brain tickling for a basic solution goes. What would you even use the stacks for in that puzzle?

e. I figured out a stack using solution for it and either my memory handling is incredibly amateur (very possible), or he needs to step up his sequence length game if we are supposed to use stacks because for n=5 it was pretty simple to cram everything in execution nodes but the memory handler seems like it'd be scalable to pretty large sequences.

Solved it without using a stack either. Pretty clean solution given the short rolling window (6 nodes, 21 instructions).

Morholt
Mar 18, 2006

Contrary to popular belief, tic-tac-toe isn't purely a game of chance.

Quinton posted:

On the comments on the update post on Steam:
Pah, prime detector was easy peasy. Break graphs erryday

Phssthpok
Nov 7, 2004

fingers like strings of walnuts
You can get some really tight loops with a Duff's Device feeding into a JRO.

Here's a signal multiplier with repeated addition in 808 cycles: http://steamcommunity.com/sharedfiles/filedetails/?id=458624641

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
I see some people with like 2000 cycle prime detectors. How is that possible? A filter that just checks all known primes below 999?

Samopsa
Nov 9, 2009

Krijgt geen speciaal kerstdiner!

Phssthpok posted:

You can get some really tight loops with a Duff's Device feeding into a JRO.

Here's a signal multiplier with repeated addition in 808 cycles: http://steamcommunity.com/sharedfiles/filedetails/?id=458624641

Coming from a non-programming background: that's amazing

Quinton
Apr 25, 2004

Phssthpok posted:

You can get some really tight loops with a Duff's Device feeding into a JRO.

Here's a signal multiplier with repeated addition in 808 cycles: http://steamcommunity.com/sharedfiles/filedetails/?id=458624641

With a somewhat more compact design you can hit 600 cycles:


I tried to add code to figure out which number was smallest and swap 'em to do the fewest operations, but the overhead of comparing and swapping ended up costing me more time than it saved.

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀
You can it more compactly and get under 500 cycles.

There's still someone on my friends list that's 97 cycles ahead of me.

Quinton
Apr 25, 2004

Oh duh, I totally over-complicated that.

DuFfY
Oct 1, 2005

brace yourself

Phssthpok posted:

You can get some really tight loops with a Duff's Device feeding into a JRO.

Here's a signal multiplier with repeated addition in 808 cycles: http://steamcommunity.com/sharedfiles/filedetails/?id=458624641

This is slick!

GuavaMoment
Aug 13, 2006

YouTube dude
Yeah so this game. I think I now understand how everyone else feels when looking at SpaceChem leaderboards. I'm more than happy to simply solve and maybe tweak my terrible solutions a little bit, because there is no way I'm catching up to you wizards.

http://gamasutra.com/view/news/244969/Things_we_create_tell_people_who_we_are_Designing_Zachtronics_TIS100.php

Zach posted:

The funny thing, he adds, is that TIS-100 is already doing pretty well in light of what it cost to produce. “I think a large part of it is just because of how audacious it is,” says Barth. “Like, having a tutorial that basically says ‘Hey, read this 14-page manual, rear end in a top hat,’ seems like it would be a really bad thing for your game, but apparently it's actually pretty effective.”

This has to be part of the reason why I'm enjoying playing this game that I should hate with every fibre of my being.

Adbot
ADBOT LOVES YOU

Phssthpok
Nov 7, 2004

fingers like strings of walnuts
The external loop counter pattern is really useful for graphics levels. For the run-length decoder, I was able to keep the current color in the output node's ACC, and have a nearby node command it to either change colors or keep printing the same color.

That approach avoids the cycle overhead of writing the X,Y location of each pixel, and the instruction overhead of swapping between loop counter and current color.

  • Locked thread