Space Engineers

Space Engineers

Action Relay - How to go beyond 100 channels in vanilla
11 Comments
Dima 🥔 May 19, 2024 @ 9:50am 
It is not some request to do or try, or include or anything. Just some thoughts I've had and shared. Maybe useful, maybe not.
CaptainFlips  [author] May 19, 2024 @ 9:45am 
So... that might be possible. I'd have to do more experimenting but I don't think it's something I should include in this tutorial. It's a more advanced technique and usually unnecessary. When more security is need, you could even have one action require 3 different sets of signals for example. I will try it at some point, I'm not sure if it will work though, but it's an interesting idea.
Dima 🥔 May 19, 2024 @ 9:38am 
To 40-20-20 format:
Yes, that is what I mean about replacing 1s timer start with 1-2 timers set to "Trigger now". That means transaction will be closed almost immediately and even if another one will be started in the middle, it will not be finished. Except if it's used not by players (which physically have comparatively big delays between interactions), but by other automated systems. And then again, yes, exclusivity totally solves it beforehand.
CaptainFlips  [author] May 19, 2024 @ 9:31am 
No worries, it's great to see someone interested in the system, logic, and potential optimizations. How else could we call ourselves engineers ;)
CaptainFlips  [author] May 19, 2024 @ 9:30am 
Let me clarify. You're reducing the security because now any channel gets through any layer. In my example we use a 40-40-20 format. This means that channels 1-40 are the only channels which are able to start a transaction. If that wasn't the case, the middle of one transaction could start a completely different one. This second transition will only close after 1s, meaning that if another signal is sent, it's possible that it goes to the end and triggers the action. So, by keeping it exclusive, we're greatly reducing the risk of accidental transaction initiations and making it much less likely for an accidently opened transaction to finish before it closes itself.
Dima 🥔 May 19, 2024 @ 9:28am 
Totally agree. Thank you for responding and explaining things, I learnt new stuff. :)
CaptainFlips  [author] May 19, 2024 @ 9:25am 
if you do 100*100*100, you're greatly reducing the security for very little gain. With a two layer system you get 2500 channels which is likely more than enough. With my recommended format, you get 32k, which should be plenty for anyone. If not, just at 4 layers you could greatly increase your bandwidth. There's no need to reduce your security.
Dima 🥔 May 19, 2024 @ 9:22am 
Hmm, yes, you are right. I thought multiple "Set Channel And Set Signal" triggered by timer are sent instantly and at the same time (in one simulation tick), but it seems there actually is small delay, or some actions are processed in order they are triggered, even inside one tick. Hmmmmmmm.
And that also means 3 channels are able to transmit not 40*40*20 actions, but 100*100*100. And adding some 1-2 gametick timers (instead of 1s) contraption should cut off unwanted overlaps.
CaptainFlips  [author] May 19, 2024 @ 9:08am 
if each layers has it's own*
CaptainFlips  [author] May 19, 2024 @ 9:04am 
The order does matter for two reasons. One, timers have a slight delay between actions and the relays only turn on for pretty much a game tick. Two, this system is most robust if you give each layer it's own range of signals. So if 85-64-25 exists then 25-64-85 won't ever be broadcast. So this system is really robust and fairly unlikely to mess up. It would be better if timers had a smaller minimal delay but that still shouldn't be a big problem.

On servers this shouldn't be an issue. You can set your own grids to Owner-Only, and in Faction-Only it's not only unlikely for your faction members to use the same sub-code, but it's easy enough to collectively keep track of it. Especially since it's recommended you include the sub-code(s) in the grid's name or antenna.

All in one, this not only seems like a very airtight solution, but probably the cheapest and most compact one even if security wasn't an issue, which is handled here quite robustly.
Dima 🥔 May 19, 2024 @ 7:08am 
If I understand it right, transmitter simultaneously sends signal over 3 channels, and receivers are set to listen on exact 3 channels. And there is no check for order, so i.e. 85-64-25 is the same as 25-64-85. Hmm. And no check for excess signals, so broadcasting over all 100 simultaneously will trigger everything. :)
Total amount of actions is 40*40*20=32000 for 3 layers, and max possible for 3 layers I guess would be 34*33*33=37026 actions. Absolute maximum is probably 50 layers each consisting of 2 relays giving something around 1.2*10^15.
2 layer 50-50 is super simple and already gives 2500 actions which is already too many.
Yeah, math checks out with your numbers, so now I think I really understand how it works.

Quite simple, nice and handy system, probably best for singleplayer. And even multiplayer if there is (will be) no way for other players to interfere with it.
Thanks for mentioning it, was interesting to look into.