A silly game
Oct. 22nd, 2011 01:56 pmRecently, thanks to
mobbsy, I have been playing quite a lot of SpaceChem.
I suppose it's most like Peeko Computer on the BBC Micro, except that the machine model is multi-threaded (yay!) and lacks jump instructions (less yay); you're given a set of primitives with slightly awkward behaviour and a task to perform, and you have to write the best program to do the job. It seems that I can usually write programs that work, but they are much bigger and slower than the optimal ones whose existence is suggested at the end of the level; and the game doesn't tend to give you advice on style and efficiency.
See: large, slow acetylene and ammonia factories


I know that a lot of my friends play this; how does one build smaller, faster factories?
I suppose it's most like Peeko Computer on the BBC Micro, except that the machine model is multi-threaded (yay!) and lacks jump instructions (less yay); you're given a set of primitives with slightly awkward behaviour and a task to perform, and you have to write the best program to do the job. It seems that I can usually write programs that work, but they are much bigger and slower than the optimal ones whose existence is suggested at the end of the level; and the game doesn't tend to give you advice on style and efficiency.
See: large, slow acetylene and ammonia factories
I know that a lot of my friends play this; how does one build smaller, faster factories?
no subject
Date: 2011-10-22 04:14 pm (UTC)For example, this is a work of utter genius for the "One Place Swap" level on Danopth (3rd planet).
no subject
Date: 2011-10-22 05:59 pm (UTC)It saves a lot of moving things around if the first bonder is on the input and the second is on the output. It also helps to keep things as simple, linear and non-tangled as possible.
The acetylene has a simple blue loop to bring in the carbon, then the red moves the two halves into place on the output, triggers the bonding and output.
My ammonia (not shown) similarly doesn't move the carbon at all, uses the red to place 2 hydrogen atoms and the blue to move the other and remove the output.
no subject
Date: 2011-10-22 06:13 pm (UTC)no subject
Date: 2011-10-22 07:20 pm (UTC)It would be shameful for me not to do a good one for the acetylene level: I did this (http://www.chiark.greenend.org.uk/~pcorbett/schem_acetylene.png) which I think has the advantage of being pretty. Furthermore with a little loop size fiddling, I even managed to elimaate the need for syncs.
Remember:
1) The start point can be moved
2) Exploit symmetry where possible
no subject
Date: 2011-10-22 09:58 pm (UTC)no subject
Date: 2011-10-26 08:20 pm (UTC)Single-reactor: Try do do things where the inputs get delivered, before you move them. Remember that the output can be anywhere in the output area (and in any orientation). Trying to add bonds to something at its maximum bond limit will fail safely. Try to find the shortest route from input to output and build your process around it. Know when to use sync, and when you don't need to. You can use a bonnd/etc instruction on one track to affect the other track if you get the timings right (even to the extent of using one track as a "controller" which never picks up an atom...)
Multi reactor: Outputs from one reactor appear at the same location/orientation in the input to the next reactor - move/rotate in whichever reactor has time to spare. Consider carefully which outputs/inputs to link up to minimise how far you need to move things within reactors (don't forget you can cross pipelines).
Acetylene (http://pics.livejournal.com/zorac/pic/0003cewc/g13) - pretty tight on both time and commands
Ammonia (http://pics.livejournal.com/zorac/pic/0003d9fk/g13) - tight on commands, not so much on time
no subject
Date: 2011-10-27 10:41 pm (UTC)I have a Disassembly reactor splitting the N2 into two N, and another splitting the CH4 into CH and 3xH. The C-H and N goes to an assembly reactor to form HCN in a predictable way. The H pipeline goes to an assembly reactor that turns H into H2. I think you said it was the last which was problematic, my solution looks like this.
Edit:
I've just improved the CH4 splitter, and now the whole solution looks a bit better. My CH4 splitter now looks like this.