Moon Logic deprecated

by mk-fg

Adds Lua-programmable circuit network combinator. Based on Sandboxed LuaCombinator and LuaCombinator2 mods. Probably won't work in multiplayer games.

Content
2 years ago
1.0 - 1.1
4.97K
Circuit network

b [not-a-bug] Desync on player join

3 years ago

My friend and i getting desync's instantly on join if a prozessor is working with heavy data.
If we turn it off for a moment until the "Catch Up" prozess is done we can enable it again and nobody get's a desync.

My suggestion would be on player join until the join is done to disable all logic prozessor's.

3 years ago

You mean as in multiplayer?
This mod is not expected to work there I'm afraid, as is stated in all descriptions (e.g. one at the top of this page), and maybe see FAQ for more info.

3 years ago

Yeah on multiplayer. Works realy fine my hope was that even if you dont completly support mp you could add this functionality. Maby i cann also add it and send you then an pr.

3 years ago

My suggestion would be to make an MP-focused fork instead and only merge any changes from here after testing for desyncs, as any fixes in that regard here might just be broken later. But if it's something simple enough, probably not a problem to merge it here too, yeah.

Adding something like "on player join until the join is done to disable all logic prozessor's" would definitely need to be tested, and ideally with some understanding of how lockstep multiplayer works and how to debug desyncs, and I'm not really up for that myself.
Conceptually, I think you'd maybe want to not just stop all MLCs, but also reset all local state in the mod on join, and then after player joins, presumably init all that stuff back from globals and map entities only, so that it'd be guaranteed-same for all parties involved that way.

3 years ago
(updated 3 years ago)

I checked some more and got the result that this is a much, much deeper problem. Seems to me the mod would need an complete multiplayer overhaul to get full mp compatibility. I currently dont have the time for such an project but eventually i will do it sometimes. The mp overhaul would then be forked over github from your mod and only sometimes updates (so it will be a multiplayer friendly "eventually outdated" version of your mod). I will send you again an message if i do it at some point.

edit: small notice:
The most parts work as intended mp doesnt likes it if you try to store values between runs and then a player try's to "catch up". Seems to me the synchronization doesnt work with the stored values.

3 years ago
(updated 3 years ago)

will send you again an message if i do it at some point.

Yeah, would be nice to link it in the description here for anyone looking for that.

mp doesnt likes it if you try to store values between runs and then a player try's to "catch up"

I imagine stuff "local CombinatorEnv" gotta be a problem there because while changes to "global" table are always synced between players, ad-hoc lua-only globals (I'll call them "locals") are not. So when player-A joins the game and gets any kind of mutable "locals" like that, when player-B joins on a later tick, they won't have that, and if any of that stuff affects what ends up in "global" table or happens in-game in any way, that should probably be a guaranteed desync.

New response