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
Zteuer
Nov 8, 2009
That warm and fuzzy feeling when you solve a level on the first try beaten to death by your name on the bottom of the list!

Adbot
ADBOT LOVES YOU

NickPancakes
Oct 27, 2004

Damnit, somebody get me a tissue.

TGS (paywalled) Thread for Zachtronics Steam Profile Sharing is up!

http://forums.somethingawful.com/showthread.php?threadid=3793493

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Zteuer posted:

That warm and fuzzy feeling when you solve a level on the first try beaten to death by your name on the bottom of the list!

To be fair, you're measuring your first try against everyone else's best try.

This makes it extra warm and fuzzy when your first try lands in a good spot on your leaderboard!

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Or when your first solution is near the top and you wonder what the worse solution looks like.

Spookydonut
Sep 13, 2010

"Hello alien thoughtbeasts! We murder children!"
~our children?~
"Not recently, no!"
~we cool bro~
http://i.imgur.com/h6NUHgc.png

Behold my $14, 1.4k power drinking game counter!

But it can handle any input conditions.

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS
Pfft here at Jefftronics, $14 will buy you a board and the alcohol to go with it. *pushes both buttons, explodes*.

Spookydonut
Sep 13, 2010

"Hello alien thoughtbeasts! We murder children!"
~our children?~
"Not recently, no!"
~we cool bro~
I really liked doing the coin machine.

I LOVED the aquaponics.

Pollyanna
Mar 5, 2005

Milk's on them.


The LED one for Cool Dad is still weirding me out, I have no idea what I should be doing. I get that the radio is transmitting RGB values, but I don't see a way to specify a pulse duration. And I don't know how to handle the "many values at once"-ness of the XBus packets...

Spookydonut
Sep 13, 2010

"Hello alien thoughtbeasts! We murder children!"
~our children?~
"Not recently, no!"
~we cool bro~

Pollyanna posted:

The LED one for Cool Dad is still weirding me out, I have no idea what I should be doing. I get that the radio is transmitting RGB values, but I don't see a way to specify a pulse duration. And I don't know how to handle the "many values at once"-ness of the XBus packets...

Don't sleep between reads of the bits of the packets.

I'm still trying to figure out how to do an interuptable pulse duration (use slp)

zedprime
Jun 9, 2007

yospos
The histograms for the coin counter and hydroponics robot have me convinced I am slowly building myself a grave of malformed, bad conditionals with spiderweb circuit traces.

e. Like speaking of the wireless transmitter, is there a trick to detecting a packet nondestructively? Its the leading tail on the histogram but it looks like there are people doing the aquaponics robot with the same amount of power my processor uses just detecting packets.

zedprime fucked around with this message at 17:58 on Oct 7, 2016

Spookydonut
Sep 13, 2010

"Hello alien thoughtbeasts! We murder children!"
~our children?~
"Not recently, no!"
~we cool bro~

zedprime posted:

The histograms for the coin counter and hydroponics robot have me convinced I am slowly building myself a grave of malformed, bad conditionals with spiderweb circuit traces.

e. Like speaking of the wireless transmitter, is there a trick to detecting a packet nondestructively? Its the leading tail on the histogram but it looks like there are people doing the aquaponics robot with the same amount of power my processor uses just detecting packets.

Here's my aquaponics packet reader http://imgur.com/a/0mwXF

zedprime
Jun 9, 2007

yospos
That explains why my aquaponics reader was a power hog where my vape pen was relatively energy efficient. I don't think I ever would have thought about putting it to sleep until the whole thing is done with a set of actions even if I sat down specifically to reduce power or else.

Spookydonut
Sep 13, 2010

"Hello alien thoughtbeasts! We murder children!"
~our children?~
"Not recently, no!"
~we cool bro~

zedprime posted:

That explains why my aquaponics reader was a power hog where my vape pen was relatively energy efficient. I don't think I ever would have thought about putting it to sleep until the whole thing is done with a set of actions even if I sat down specifically to reduce power or else.

I started by building the motor controller first, and then the packet reader became pretty self-evident, then the tool controller too. I wouldn't have thought of it otherwise.

nielsm
Jun 1, 2009



General tip: On the MC's all pins can function as both input and output, they aren't pre-designated for one or the other. In particular XBus links can be used for bidirectional communication.

Hacky way to get extra temporary storage: Put a value on a simple bus, then sleep. When another component will need that value, wake it up with an arbitrary value on an XBus. You just saved one or two registers. Downside is that you can't read it back on the same component.

Hint for LED puzzle: Remember that simple pins retain their output value as long as you don't actively change it.
Hint 2: So just check the radio input every tick against -999 and count down, you only need to change the output pins when the time runs out.
Hint 3: Remember the SLX instruction, it's useful for making a component that does work only when necessary.
My solution: https://puu.sh/rAW0j/f1b990885b.png

Overview of my solution for aquaponics puzzle: One unit takes motor drive commands in the form of "-1" and "+1" XBus packets. A component feeds that by getting commands of new desired position, and keeping track of current position. That component sends a signal back over its input-bus to indicate the device has finished moving. The tool clean and feed outputs are driven by a DX300 controlled by a MC, that gets the signal to begin the clean-feed cycle over XBus but gets the actual durations of each step over analog bus. Those analog buses were set when the command packet initially arrived on radio and just sat idle until then.
My solution: https://puu.sh/rAWBQ/df2b66e3db.png

Spookydonut
Sep 13, 2010

"Hello alien thoughtbeasts! We murder children!"
~our children?~
"Not recently, no!"
~we cool bro~

nielsm posted:

Overview of my solution for aquaponics puzzle: One unit takes motor drive commands in the form of "-1" and "+1" XBus packets. A component feeds that by getting commands of new desired position, and keeping track of current position. That component sends a signal back over its input-bus to indicate the device has finished moving. The tool clean and feed outputs are driven by a DX300 controlled by a MC, that gets the signal to begin the clean-feed cycle over XBus but gets the actual durations of each step over analog bus. Those analog buses were set when the command packet initially arrived on radio and just sat idle until then.
My solution: https://puu.sh/rAWBQ/df2b66e3db.png

Hints:
You don't need the io extender or the bridge, and your packet reader only needs to be an MC3000 if you figure out how to trigger the tools.

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
Game done! Took me about 16 hours. The boards get really cramped later on - I think I spent more time shuffling components than writing code on some of the later ones.

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

nielsm posted:

Hint for LED puzzle: Remember that simple pins retain their output value as long as you don't actively change it.
Hint 2: So just check the radio input every tick against -999 and count down, you only need to change the output pins when the time runs out.
Hint 3: Remember the SLX instruction, it's useful for making a component that does work only when necessary.
My solution: https://puu.sh/rAW0j/f1b990885b.png

Wow ours are almost exactly the same, except for swapping the roles of dat and acc. And not needing that superfluous bridge lol

nielsm
Jun 1, 2009



Hey bridges are free! (Unless they count for something in the 3rd metric I still don't know what is.)

zedprime
Jun 9, 2007

yospos
That sandwich maker is a project I can get behind, and my initial troubles with it all but confirm I am my own worst enemy.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.
Some goons have reported that the Solitaire game is difficult for color-blind people (and the rest as well! :v:), if you're one of those you can help Zach fix it:
https://twitter.com/zachtronics/status/784485581568958464

Bonfire Lit
Jul 9, 2008

If you're one of the sinners who caused this please unfriend me now.

Safetynet Tracking Badge is a right bastard or was until I finally got comfortable with having more than two peers on each XBus connection. ¥22/670

TheOneAndOnlyT
Dec 18, 2005

Well well, mister fancy-pants, I hope you're wearing your matching sweater today, or you'll be cut down like the ugly tree you are.

ymgve posted:

Game done! Took me about 16 hours. The boards get really cramped later on - I think I spent more time shuffling components than writing code on some of the later ones.
How many puzzles are there in total?

Fiduciary
Jan 5, 2009
Passive Infrared Sensor : Poundland Edition.
Go cheap or go home http://i.imgur.com/WbFvdf2.png .

nielsm
Jun 1, 2009



zedprime posted:

That sandwich maker is a project I can get behind, and my initial troubles with it all but confirm I am my own worst enemy.

Sandwich maker was fun, but the Smart Grid Router is a bitch. Does anyone have hints for that, or suggestions for general approach? My current approach involves an MC4000X in front of every output, on a shared data bus but each has a separate bus I want to set high if it should handle the transmission. Fitting everything in is my hell.

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock

TheOneAndOnlyT posted:

How many puzzles are there in total?

30 puzzles, excluding the Solitaire goal and the "design your own game" challenge.

(Also, how many of you were honest and tried making a game?)

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

Fiduciary posted:

Passive Infrared Sensor : Poundland Edition.
Go cheap or go home http://i.imgur.com/WbFvdf2.png .

Heh, I love how convoluted you can get.

I have the infrared sensor down to 211 power. Of all my solutions so far that's what I'm most pleased with, as it's way off the left of the histogram.

e: 210!

Fuzzy Mammal fucked around with this message at 22:22 on Oct 7, 2016

Bonfire Lit
Jul 9, 2008

If you're one of the sinners who caused this please unfriend me now.

nielsm posted:

Sandwich maker was fun, but the Smart Grid Router is a bitch. Does anyone have hints for that, or suggestions for general approach? My current approach involves an MC4000X in front of every output, on a shared data bus but each has a separate bus I want to set high if it should handle the transmission. Fitting everything in is my hell.
I'm using two MC6000, one prefixing every packet with a routing key (>0, 0, <0) that the second MC6000 can dispatch on without requiring another XBus pin for the ID chip
e: can you fit all of your routing code into one MC6000? if so, something like this might work:


209! :sun:

Bonfire Lit fucked around with this message at 22:48 on Oct 7, 2016

homeless snail
Mar 14, 2007

ymgve posted:

30 puzzles, excluding the Solitaire goal and the "design your own game" challenge.

(Also, how many of you were honest and tried making a game?)
I got about halfway through making a pong game and then just hit the button.

zedprime
Jun 9, 2007

yospos
My new favorite pastime, not having the chops for serious code golf, is to add in hard coded long sleeps into input handlers if they have the instruction space. Its not a limitation if I ignore input for 20 cycles, its called being green.

e. I'm going to make Game and Watch Ball in the sandbox someday, even if it kills me.

Quinton
Apr 25, 2004

Pretty proud of my 11 cost, 312 power solution to TRAFFIC SIGNAL.

I ended up with a solution similar to Bonfire Lit's for the SMART GRID CONTROL ROUTER:
One MC6000 to convert packets from ID/COUNT/DATA... to DIR/COUNT/ID/COUNT/DATA... and the other to transmit the packet to the destination... cost 10, power 486.

Quinton fucked around with this message at 22:56 on Oct 7, 2016

Pollyanna
Mar 5, 2005

Milk's on them.


nielsm posted:

Hint for LED puzzle: Remember that simple pins retain their output value as long as you don't actively change it.
Hint 2: So just check the radio input every tick against -999 and count down, you only need to change the output pins when the time runs out.
Hint 3: Remember the SLX instruction, it's useful for making a component that does work only when necessary.
My solution: https://puu.sh/rAW0j/f1b990885b.png

Ahhh goddammit. I only realized what was really going on once I put your solution in and through it.

So basically, assume your acc will be keeping track of CPU cycles performed. Each cycle, save the value of the radio's XBus connection to an auxiliary register. If it's -999, that's is a sign that there's no data coming in, i.e. nothing is happening, and you just decrement acc and sleep for a unit of time.

Upon seeing a value on x0 that is not -999, the device is "awake", and therefore there's an incoming data stream. You then need to do the following, in pseudocode:

move the first packet of data from the aux register (which you do at the beginning of every cycle)
to the connection corresponding to LED-R
take the second packet of data off of the stack on the radio register, and move to the LED-G connection
take the third packet of data off of the stack on the radio register, and move to the LED-B connection
take the fourth and final packet of data off of the stack on the radio register,
and move to acc to represent the units of time this will last if uninterrupted

afterwards, check and see if acc is at 0
if so, that means the LED time is up, and:
set all LED registers to 0


It's somehow both more and less complicated than I expected and I originally went off in a totally different direction when thinking about this. :downs: This is a really good game.

EDIT: I've also got a question. I'm having a bit of a hard time writing code for AND conditions in this assembly-ish language. Pretend I've got two registers, a and b, that can both be either 0 or 100, and I want to write code to push a certain value to a different register for each combination of the register states. This is what I have so far:

code:
  teq p0 0
+ jmp a0
- jmp a100
a0:
+ teq p1 0
+ mov 0 x0
- mov 2 x0
a100:
+ teq p1 0
+ mov 1 x0
- mov 3 x0
  slp 1
This is relatively heavy memory-wise, and I'm wondering if there's a better way to represent four-state conditionals without relying on labels and jumping around. It certainly works, don't get me wrong, but I feel like I'm missing something obvious.

EDIT 2: Also sleeping/timing issues are driving me up the loving wall. I still don't get why my poo poo doesn't work.

Pollyanna fucked around with this message at 00:53 on Oct 8, 2016

homeless snail
Mar 14, 2007

I got pulse generator down to 120, I'm pretty sure that's the lowest it can go, I think??

zedprime
Jun 9, 2007

yospos
Working with 2 bits with 1 or 2 registers in 9 or 13 lines of code is probably going to end up a nightmare any way you work it out. I haven't gotten there yet but the spec sheets imply you unlock boolean ICs to help you out. Until then, think about data manipulation to either pare the condition tree or operate on different parts of the tree in different places.

Its probably child's play compared to some of the nesting you can do, but for example you can use tcp for 3 states, greater, less, or equal, by putting it in the following form:
code:
start: tcp [1] [2]
+ mov things when [1] > [2]
+ ...
+ jmp start
- mov things when [1] < [2]
-...
- jmp start
mov things when [1] = [2]
e. My smart grid router is off the histogram on the right, which I will take as a secret victory because it means I found a way to fit probably every MC4000 you physically can on the board.

zedprime fucked around with this message at 01:16 on Oct 8, 2016

Quinton
Apr 25, 2004

zedprime posted:

Its probably child's play compared to some of the nesting you can do, but for example you can use tcp for 3 states, greater, less, or equal, by putting it in the following form:
code:
start: tcp [1] [2]
+ mov things when [1] > [2]
+ ...
+ jmp start
- mov things when [1] < [2]
-...
- jmp start
mov things when [1] = [2]

You can also just:
code:
start: tcp [1] [2]
+ mov things when [1] > [2]
+ ...
- mov things when [1] < [2]
-...
teq [1] [2]
+ mov things when [1] = [2]
in some situations and possibly save an instruction.

Phssthpok
Nov 7, 2004

fingers like strings of walnuts
Like TIS-100, you can optimize a lot by spotting hidden patterns in the test data. The infrared sensor always has an "on" time greater than the initial time. The drinking game never presses both buttons at once. The VR buzzer is always off for at least 3 cycles.

You can take advantage of the gaps in the test to ship a product with better apparent value, but with serious defects. It seems like this is an intended theme of the narrative.

zedprime
Jun 9, 2007

yospos
I hope the sandbox spawns a demo scene.

I made a skull demo because hey its Halloween. I don't know anything about writing music but that makes it extra spooky I guess?

Save this text file in your documents\my games\Shenzhen IO\[personal hash] folder. Download this sick skull to the custom_screens folder in the same place, rename it to skull.png and then prepare to be spooked.

Phssthpok
Nov 7, 2004

fingers like strings of walnuts
After making a spaghetti mess of a sandwich machine (which can handle inputs in any order), I learned that the test input always presses the buttons in order.

Spookydonut
Sep 13, 2010

"Hello alien thoughtbeasts! We murder children!"
~our children?~
"Not recently, no!"
~we cool bro~
With the grid router, am I on the right track in having lower->higher and higher->lower packets being processed through the middle first?

Also should I use a ram module?

Quinton
Apr 25, 2004

I did the router with a pair of MC6000s.

One of them absorbed the input packets, converted the address to a -1/0/1 direction, and passed them to the second prefixed by the direction and count.

The second one spooled the packets out to the appropriate output.

Adbot
ADBOT LOVES YOU

nielsm
Jun 1, 2009



Quinton posted:

I did the router with a pair of MC6000s.

One of them absorbed the input packets, converted the address to a -1/0/1 direction, and passed them to the second prefixed by the direction and count.

The second one spooled the packets out to the appropriate output.


I also solved that puzzle now based on that idea, was definitely easier than my original one. However I think I simplified the design in two ways: First, instead of signalling strict -1/0/1 for destination, I just subtract the current and destination node IDs to get a negative/zero/positive number I think that saves one or two instructions. Second, I avoid counting in the output module, by using a simple I/O pin from the input to signal whether there are more data, so I keep the line high while there are data and set it low at the end. I was a little surprised you actually can use simple I/O lines like that within a single I/O cycle.

  • Locked thread