A BepInEx mod for the game Mechanica (a survival and programming game abandoned during development, still unstable) that fixes multiplayer to make it playable.
A BepInEx mod for the game Mechanica (a survival and programming game abandoned during development, still unstable) that fixes multiplayer to make it playable.
Seems I’ve fixed the infinite loading issue!
BUT, because why not, I found more major bugs. Most are fixed, but one is a real wall:
Under unknown conditions, the host gets timed out from their own server. I’ve ensured that if the server cuts out, clients now return to the menu with an error message. The base game didn’t handle this, leaving everyone stuck on infinite loads—mind-blowing, since handling connection loss is Networking 101.
Problem is, I can’t find the cause of the host timeout yet. Limited tester availability and the bug’s random nature are slowing me down.
Other issues: Laser Triggers are totally desynced 🤷, and conveyor belts are broken even in solo…
Computer.ReceiveVirtualFunctionExecute() - Checks bounds before accessComputer.ReceiveVirtualEventInvoke() - Checks boundsComputer.ReceiveVirtualObjectDestroy() - Checks boundsObjectManager.ApplyAllGUS() - Absorbs NullRefs during shutdownSorry for the random image, I didn’t really have any ideas for a proper illustration for this devlog.
Log in to leave a comment
I wrote a Python script to check the date format in the save files to see if they’ve been patched by the mod
Log in to leave a comment
The main issue with Mechanica’s multiplayer is the infinite loading when a player joins a game that has already been created.
I conducted extensive tests and collected logs to identify the causes of this problem. I decompiled the game code and used profiling tools to pinpoint failure points.
This allowed me to discover several major issues, some of which were much harder to identify than others. So far, I have identified and theoretically fixed 12 problems, ranging from simple precautions to logging improvements to help identify new issues in the future.
I also wrote a PowerShell build script to automatically compile the mod and update it in the game.
The patches I applied are as follows:
Date reading issue
New game creation issue
Save sorting issue
Corrupted lobby data
Inventory loading issue
Network errors
Premature disconnection
Lobby transition issue
Lobby refresh issue
Lobby connection issue
Player connect/disconnect issue
Disconnection without saving
Log in to leave a comment