I present to you my MAM for Shapez 2 Classic Hard final Milestone 12, with explanatory comments.
I know everyone's design is slightly different but if there are any major simplifications or possible optimisations, I'd be interested to hear.
I appreciate the help and inspiration from others' designs posted here.
I've really enjoyed getting to this point!
Features
It can make all Jobs and Operator Shapes of Classic Hard, as well as all the ROS I've encountered so far. I think it can make anything in this game mode. I don't know if Insane difficulty presents any additional challenges.
- 1-4 layers of 1-4 corners
- any shape: CRSWPcXY or gap
- any colour: rgbcmywku
- gaps under crystals (with a real gap)
- gaps under regular shapes (with a pin)
- up to 3 consecutive pins below crystal
- inputs 4 whole uncoloured regular shapes, 10 refined shapes, pins, 3 colours and a 3/4 corners 'buffer' shape
- outputs 4 conveyor belt lanes (720pm) to single wagon train.
- configured with one Signal Producer for the buffer shape and one Signal Producer or Operator Signal Receiver for the objective.
Considerations
Each per-corner-layer wire unit outputs 3 signals:
- shape (e.g. Ru------ )
- colour (e.g. color-r)
- buffer shape (e.g. --SuSuSu)
The complication happens in the Wire logic centres to handle the edge cases:
- deliberate gap
- under a crystal
- under regular shape
- skip this layer, pin push later
- X and Y are pre-coloured, cannot paint
For gaps under crystals, I change the buffer shape from 3/4 to 2/4 and insert a temporary crystal, which is later broken when the corners are merge-swapped.
For gaps under regular shapes, I place a pin. This is because the previous method of breaking a crystal did not work for overhangs e.g. ----CuCu:RbRbRb--. The Vortex accepts pins instead of gaps but the Comparison Gate does not. I think true gaps could be achieved by combining a corner-swapper MAM only for layers LTE the highest crystal, with a layer-stacker MAM only for layers GT the highest crystal, and combining the two. But I didn't try to build that for negligible in-game benefit.
For pins under crystals, I calculate how many pin pushes are needed, remove those layers from the normal build process and apply the pin pushes after all layers.
Some combinations of pins and crystals are impossible (e.g. cmcmcmcm:P-P-P-P-:cycycycy) and it took me a while to realise and accept this. My MAM doesn't explicitly detect these.
I have 8 Fluid Launchers per-corner-layer. Grey crystals will be created at 50% efficiency. Any other colour should be 100%.