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
NickPancakes
Oct 27, 2004

Damnit, somebody get me a tissue.


quote:

SHENZHEN I/O: BUILD CIRCUITS. WRITE CODE. RTFM.

SHENZHEN I/O is the new game from Zachtronics, makers of Spacechem, Infinifactory, and TIS-100.

Similar to TIS-100, the game is primarily a puzzle game involving an Assembly-style language written to control various microcontrollers that must be programmed and wired together to produce a particular output. The game includes various metrics to compare your best solution to your Steam friends.

Out now in Early Access, but like the previous two games, it incredibly complete and playable and will likely be taken out of early access after everyone gets their hands on it and a patch or two are released.

Steam Page
Official Subreddit
Another Official Subreddit for suggestions decide the path of the game updates as they works towards leaving Early Access

Want some goon friends to compare your scores against? Go check out and post your profile in the Zachtronics Steam Profile Thread

NickPancakes fucked around with this message at 22:40 on Oct 14, 2016

Adbot
ADBOT LOVES YOU

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.
There really is nothing like a Zachtronics game to make me feel like a complete and utter idiot.

I loving love it. :getin:

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Yess, just in time to give me something to do during 20 hours of flight time

zedprime
Jun 9, 2007

yospos
Joe is my spirit animal.

So far so simple but the metrics are absolutely taunting now that they are diagetic. Histograms are spotty but hey its only been out for an hour and change and there's enough nagging in my head saying no you're doing it wrong.

Zteuer
Nov 8, 2009
Loving it after just a few simple challenges. Story/atmosphere is pretty nice.

I need more friends for leaderboards, so please add me (Zteuer).

Also I need some aspirin.

Orthogonalus
Feb 26, 2008
Right angles ONLY
I'm looking forward to feeling like a genius for finishing a task today, and a mega-genius one week later when I make a design that's 300% more effective. And then feeling like an idiot again when I hit the inevitable brick wall and never finish the game with just a few missions left.

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS
I haven't seen my girl in two weeks. She's coming over tonight so I hope she's ready to spend the evening debugging signal traces.

nielsm
Jun 1, 2009



Very entertaining so far.
The solitaire game was a bit annoying (yes it does miss an Undo function!) but still entertaining :)

Puzzles solved so far:
Security Camera (fake): 6/60/?
Replacement factory module: 3/240/?
Pulse generator: 3/240/?
Light up signs: 7/172/? (this one optimized with the I/O expander only available later)
Rubbish audio thing: 6/447/?
Bring out the Baron: 9/719/?
Infrared sensor: 8/540/?
VR buzzer: 5/208/?
Device 2A27: 11/897/?
Little help: 8/466/?

I'll have to revisit some earlier with new parts etc. at some point.

However as the CEO puts it, "an unhealthy body builds a defective product," so I should get myself some sleep.

Pollyanna
Mar 5, 2005

Milk's on them.


I'm not sure I understand how slp works. As I understand it, it sleeps the controller for x cycles, but for the amp you need to have slp 1 after moving the data to p2, but there isn't any sort of lag time between the input and output tests. Why isn't it delayed?

nielsm
Jun 1, 2009



Pollyanna posted:

I'm not sure I understand how slp works. As I understand it, it sleeps the controller for x cycles, but for the amp you need to have slp 1 after moving the data to p2, but there isn't any sort of lag time between the input and output tests. Why isn't it delayed?

You need to sleep until the next input cycle. Microcontrollers have infinite clock rate so they will keep running for any number of instructions in an I/O cycle if you don't sleep them.
Effectively "slp 1" means "this controller has no more work to do until next I/O cycle".

Pollyanna
Mar 5, 2005

Milk's on them.


nielsm posted:

You need to sleep until the next input cycle. Microcontrollers have infinite clock rate so they will keep running for any number of instructions in an I/O cycle if you don't sleep them.
Effectively "slp 1" means "this controller has no more work to do until next I/O cycle".

Ohhh, okay. I think I get it. I'm too used to TIS-100 I guess.

I'm on the signboard now, and I'm wondering how to handle the animation state. I noticed that the state of drink-1 is equal to -(drink-0) + (drink-2), but I'm blanking out on how to encode that using the MCs. Am I required to use a 6k here, or is there a way to do it with a few 4ks?

edit: ahhhhh the time delta between signals on drink-2 is 7 at first but becomes 8 later :( what the gently caress how do i handle this

edit2: yesss i got it

Pollyanna fucked around with this message at 23:01 on Oct 6, 2016

nielsm
Jun 1, 2009



My initial solution used three 4k units and nothing else but you later get new components that can optimize it.

Two Owls
Sep 17, 2016

Yeah, count me in

Subtly vague datasheets! Slightly - a cynic may say almost deliberately - ambiguous specs! The overwhelming desire to ring somebody up on another continent and scream "HOW DOES THIS BLOODY THING ACTUALLY WORK, THEN?"

This is hitting a little too close to home.

NickPancakes
Oct 27, 2004

Damnit, somebody get me a tissue.

nielsm posted:

My initial solution used three 4k units and nothing else but you later get new components that can optimize it.

Yeah I just brute forced it with a unit per output (I didn't realize you could use p1 for input. Protip, you can use p1 for input, and use the xbus pins for cross-component communication). I'll go back later when I have better modules.

New Zealand can eat me
Aug 29, 2008

:matters:


Ugh this game is so good, I only have one complaint:

How the gently caress does this solitaire work? I'd really like to win but I don't understand what the symbol cards are for/how they work

Two Owls posted:

This is hitting a little too close to home.

loving :same:, down to the seemingly clueless recruiter and everything

Pollyanna
Mar 5, 2005

Milk's on them.


I totally forgot about the xbus. I kind of expected those ports to only come into play later in the game... as long as I can output the results of -(drink-0) + drink-2, I should be good, but I still don't know how to do that with just three 4ks. I'll figure it out.

edit: Oh yeah, there's some economy-of-space issues with the components and the channels crossing over each other. Hmmm.

Pollyanna fucked around with this message at 23:27 on Oct 6, 2016

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

New Zealand can eat me posted:

Ugh this game is so good, I only have one complaint:

How the gently caress does this solitaire work? I'd really like to win but I don't understand what the symbol cards are for/how they work


loving :same:, down to the seemingly clueless recruiter and everything

it's like a cross of normal solitaire plus freecell, except you have dud cards that only get in the way. Four for each suit. If all four are uncovered you can move them all into a single free spot on the top left.

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

Pollyanna posted:

I totally forgot about the xbus. I kind of expected those ports to only come into play later in the game... as long as I can output the results of -(drink-0) + drink-2, I should be good, but I still don't know how to do that with just three 4ks. I'll figure it out.

Double posting to mention splitting up logic is usually the way to go. For example, why not make two units, each of whose job is to output the increment (+1 or +0 for score, and -1 or -0 for foul) and have someone else keep track of the sum?

zedprime
Jun 9, 2007

yospos
The difference between xbus and simple IO makes me want to throw things. In a "I'm under-utilizing this" kind of way.

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy
Has anyone figured out the rules for how traces can be combined? It looks for example like you can do a Y on xbus where you read multiple inputs and you don't care which module's data you get first.

Pollyanna
Mar 5, 2005

Milk's on them.


Fuzzy Mammal posted:

Double posting to mention splitting up logic is usually the way to go. For example, why not make two units, each of whose job is to output the increment (+1 or +0 for score, and -1 or -0 for foul) and have someone else keep track of the sum?

I'm just gonna go ahead and post my current approach.

I have both units outputting the necessary values, and one of them also handles the value for the middle output. The issue I have is in how to modify the value coming out of the left component based on the rightmost component. I tried using a 6k to store the leftmost input, then wait for the right input and calculate the result, but I ran into issues where the components would get out of sync and they'd get stuck sleeping somewhere. How close am I to the solution?

New Zealand can eat me
Aug 29, 2008

:matters:


Fuzzy Mammal posted:

it's like a cross of normal solitaire plus freecell, except you have dud cards that only get in the way. Four for each suit. If all four are uncovered you can move them all into a single free spot on the top left.

Are there 4 types of dud cards? Or 3? What's with the rose thing

Here's my lovely version of the esports sign

E: I won the next time I tried playing, aw yiss

New Zealand can eat me fucked around with this message at 00:16 on Oct 7, 2016

Pollyanna
Mar 5, 2005

Milk's on them.


New Zealand can eat me posted:

Are there 4 types of dud cards? Or 3? What's with the rose thing

Here's my lovely version of the esports sign

E: I won the next time I tried playing, aw yiss

I saw your solution, went "gently caress it" and just brute forced it instead of trying to over-complicate the matter. Thanks!

Now I need to figure out how to get across the concept of a "transition" to modify the output. That assumes comparing current input with past input, and therefore some sort of memory, right? It doesn't look like there's any nested conditionals.

Pollyanna fucked around with this message at 00:40 on Oct 7, 2016

zedprime
Jun 9, 2007

yospos

Fuzzy Mammal posted:

Has anyone figured out the rules for how traces can be combined? It looks for example like you can do a Y on xbus where you read multiple inputs and you don't care which module's data you get first.
As far as I can tell, when sending on xbus, you send 1 discrete chunk of data, which is served on a first called first serve basis. When sending on basic I/O, you broadcast the value until you send something new. When calling for data, bI/O will read whatever is on the line, including 0. When calling for data, xinput will stand until it gets its data packet, preventing sleep without a matching broadcast.

So you can only ever really have 1 broadcaster on a bI/O trace or you need to take advantage of the collision edge case, while you can be broadcasting all you want on an xbus, but need to account for races if you want your data going specific places.

I hope everyone took the requirement to program a game seriously. Its hard to make anything interesting when there's the promise of RAM dangling in front of your nose but I hope you enjoy my guess the pass word game. Technically :nws: for the silliest reason. The answer is to turn it up to 11, obviously. :nws:

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.

Fuzzy Mammal posted:

Has anyone figured out the rules for how traces can be combined? It looks for example like you can do a Y on xbus where you read multiple inputs and you don't care which module's data you get first.
I experimented with this:

Simultaneous I/O
- Output goes to every Input
- If there are multiple Outputs, the largest Output wins (though there are some edge timing cases with simultaneous Outputs)

Simultaneous XBus
- First come, first serve
- Only one Input/Output can be served at any time, the rest block waiting for their turn
- If there are simultaneous Inputs/Outputs, the bottom-leftest port goes first

New Zealand can eat me
Aug 29, 2008

:matters:


^Are the race conditions dependent on trace length?!?

Pollyanna posted:

Now I need to figure out how to get across the concept of a "transition" to modify the output. That assumes comparing current input with past input, and therefore some sort of memory, right?

Yeah I didn't really feel the need to be so clever for a simple esports sign I guess.

you mean like mov'ing p0 to acc and then the next tick doing something like a tgt p0 acc?

I totally just now realized that the left sides are not input only :aaaaa: another TIS-ism (heh tism)

Pollyanna
Mar 5, 2005

Milk's on them.


New Zealand can eat me posted:

^Are the race conditions dependent on trace length?!?


Yeah I didn't really feel the need to be so clever for a simple esports sign I guess.

you mean like mov'ing p0 to acc and then the next tick doing something like a tgt p0 acc?

I totally just now realized that the left sides are not input only :aaaaa: another TIS-ism (heh tism)

Kinda sorta. The question is how to limit that "something changed!!!" broadcast to only when you go from 0 to 100, and not from 100 to 0.

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.

Pollyanna posted:

Kinda sorta. The question is how to limit that "something changed!!!" broadcast to only when you go from 0 to 100, and not from 100 to 0.
This is covered in your trusty Application Notes.

SupSuper fucked around with this message at 00:47 on Oct 7, 2016

New Zealand can eat me
Aug 29, 2008

:matters:


Another thing I just realized you can do: run traces under chips :3:



(code is useless just look at the p0 trace)

ymgve
Jan 2, 2004


:dukedog:
Offensive Clock
Anyone want to be friends on Steam to compare scores? http://steamcommunity.com/id/threedotonefour

Pollyanna
Mar 5, 2005

Milk's on them.


SupSuper posted:

This is covered in your trusty Application Notes.

RTFM indeed. Now I just need to figure out what the gently caress "Part not sleeping" means :shepface:

zedprime
Jun 9, 2007

yospos

Pollyanna posted:

RTFM indeed. Now I just need to figure out what the gently caress "Part not sleeping" means :shepface:
I don't think its actually explained anywhere but who knows with dozens of specs. In order to advance in time units, all controllers must be asleep. That means no hanging out waiting to catch a buzz on the xinput or unterminated loops without a sleep in the loop.

Pollyanna
Mar 5, 2005

Milk's on them.


zedprime posted:

I don't think its actually explained anywhere but who knows with dozens of specs. In order to advance in time units, all controllers must be asleep. That means no hanging out waiting to catch a buzz on the xinput or unterminated loops without a sleep in the loop.

Oh, dammit. So it ultimately comes down to timing issues with XBus synchronous stuff. Ughhh. I deal with enough sync vs. async crap at work :(

homeless snail
Mar 14, 2007

Pollyanna posted:

RTFM indeed. Now I just need to figure out what the gently caress "Part not sleeping" means :shepface:
CPUs in this game can execute an infinite number of instructions per time unit, so the simulation won't advance to the next time unit until all microcontrollers are sleeping.

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS
Yeah it basically lets you run as many instructions as you want between time ticks. (Not tested.) It doesn't know when to move time forward until everyone sleeps.

Pollyanna
Mar 5, 2005

Milk's on them.


So how do I debug those kinds of issues, where some part isn't sleeping because it's expecting to hand off a value to another MC that isn't looking for it? Is there some sort of heuristic involving lines of code or sleep cycles that I can follow?

pumpinglemma
Apr 28, 2009

DD: Fondly regard abomination.

Aaaahahaha. Not all of the instructions were translated for the English documentation. One of the missing ones generates a pulse, which you find out after you've just spent a bunch of levels needing to generate pulses. Jie is a glorious rear end in a top hat. Also, I love how many of these products are manifestly awful ideas. Sure, let's help an AI corporation mine some thorium. What could go wrong?

Oh, and I just spent about an hour swearing at input synchronisation because I didn't RTFM hard enough and missed the SLX instruction. Suddenly everything has become much easier.

pumpinglemma fucked around with this message at 01:55 on Oct 7, 2016

pumpinglemma
Apr 28, 2009

DD: Fondly regard abomination.

Pollyanna posted:

So how do I debug those kinds of issues, where some part isn't sleeping because it's expecting to hand off a value to another MC that isn't looking for it? Is there some sort of heuristic involving lines of code or sleep cycles that I can follow?
This is where SLX is useful - it basically lets a chip wait for input on a given XBus pin for an indeterminate period. So as long as the second chip starts waiting before the first chip outputs, you're fine. Alternatively, for simple applications you can just have the first chip output and the second chip input every cycle or at fixed cycle intervals. Alternatively, you can use the simple I/O pins - which will never hang but open up the possibility of the second chip accidentally reading its input before the first chip has updated it.

e: Unless you mean, like, "how do I tell what the problem is", in which case the button marked Step is your friend.

Pollyanna
Mar 5, 2005

Milk's on them.


pumpinglemma posted:

This is where SLX is useful - it basically lets a chip wait for input on a given XBus pin for an indeterminate period. So as long as the second chip starts waiting before the first chip outputs, you're fine. Alternatively, for simple applications you can just have the first chip output and the second chip input every cycle or at fixed cycle intervals. Alternatively, you can use the simple I/O pins - which will never hang but open up the possibility of the second chip accidentally reading its input before the first chip has updated it.

e: Unless you mean, like, "how do I tell what the problem is", in which case the button marked Step is your friend.

My question is ultimately one of keeping them in sync, i.e. "how do I make sure I don't end up in a state where a chip is waiting for a signal from the wrong chip, therefore one won't go to sleep". I learn best from example, so here's my current solution for the heat sensor. I can see here that the issue is that the rightmost chip is waiting for a response from the upper left chip while the bottom chip is waiting to write to the rightmost chip, and the upper left chip is asleep. I just don't really understand how to avoid this situation, because it seems less like I have to put SLX statements everywhere and more that I need to make sure everything executes in the expected order every time, which doesn't seem to be guaranteed at all.

Adbot
ADBOT LOVES YOU

New Zealand can eat me
Aug 29, 2008

:matters:


Ahhhh I figured out drinking game.

I don't know why I was beating my head so hard. I really need to stop trying to do something fancy immediately, and instead just make something that works first and then pair (pare?) down

Worst solution on my friends list :c00lbert: As far as I'm concerned, I'm winning, because the guy who owns the factory is giving me kickbacks for keeping unit price high :smug:

I do wish there was some sort of incentive for having nicer solutions other than bragging rights

  • Locked thread