Multiplayer Lite

OHM Multiplayer Lite 0.3

Great! now it works. I'm docked :D

Hmm according to the server you are not online, I only see my 2 vessels. You might have docked with a local vessel.
 
This is extremely bizzarre, trying to wrap my head around it...according to the server you are not there at all.... Thank you for testing!

edit:

I think I understand what's happening... fix coming soon.

edit2:

Fix attached with better connection management.
 

Attachments

Last edited:
Since it seems to be stable, might be time to update the main download on the addons page.
that's the old link, recent post has the client with animation sync, could use a bit more testing.
 
that's the old link, recent post has the client with animation sync, could use a bit more testing.
Will be happy to test tonight, if you're around. Have a Dark Energy spaceplane to re-enter and land first, so ping me if you want to test.
 
that's the old link, recent post has the client with animation sync, could use a bit more testing.
So, activated the newest version, and we have a problem: This new version causes Orbiter to hang every 5 seconds for a brief moment. It recovers, but it's very annoying. Disabling the module and reloading the same scenario removes the issue. Do you have something running on a roughly 5 second loop in your code? If so, it's hanging the main thread.
 
So, activated the newest version, and we have a problem: This new version causes Orbiter to hang every 5 seconds for a brief moment. It recovers, but it's very annoying. Disabling the module and reloading the same scenario removes the issue. Do you have something running on a roughly 5 second loop in your code? If so, it's hanging the main thread.

Hey WingC3. Thanks for testing it! This is a problem and I am wondering how to approach this. You must have a lot of scenario files in your scenario folder.
Turns out that when Orbiter saves state, it's currently scanning the entire scenario directory, and if you have a lot of files in there, it causes a slight stutter everytime oapiSaveState is called (currently every 5 seconds).

This problem is fixed in Open Orbiter... so that's the good news. If you move the scenario files out of the Scenarios folder, it "fixes" the stutter.
What do you think would be a good compromise? No animations for Orbiter 2016? I can have it automatically move the scenario files out of the
Scenarios folder and then move all of them back when you're done but that seems crude.
 
Hey WingC3. Thanks for testing it! This is a problem and I am wondering how to approach this. You must have a lot of scenario files in your scenario folder.
Turns out that when Orbiter saves state, it's currently scanning the entire scenario directory, and if you have a lot of files in there, it causes a slight stutter everytime oapiSaveState is called (currently every 5 seconds).

This problem is fixed in Open Orbiter... so that's the good news. If you move the scenario files out of the Scenarios folder, it "fixes" the stutter.
What do you think would be a good compromise? No animations for Orbiter 2016? I can have it automatically move the scenario files out of the
Scenarios folder and then move all of them back when you're done but that seems crude.
I'm slightly confused: I understand what you're saying about api calls by Orbiter to save its state, and yes, I have lots of scenario files.
What I'm not understanding is how this is interacting with your plugin.
Your answer implies that you are calling this state saving function in a way that it isn't normally used (since I don't have the stutter normally) in order to gain information about the other vessels in the scenario.
1. Is that the only way to get that information?
2. If that is indeed what you're using it for, does it need to be called multiple times or only on client connect? Players don't usually change the craft in their scenario whilst in flight. They can, but they generally don't. For Orbiter2016, this might mitigate the issue. For OOx86, you could leave it as is if it doesn't have the same impact.

I wouldn't start moving people's scenario files around. It only has to go wrong once for someone, and you'll have some very unhappy users.
 
Usually the scenario saving callback is used as a trick to gather internal vessel information. This information is then transferred to the other client and applied by means of using the loading callback. If done in the render loop thread, it will often cause Orbiter to stutter. Best practice here is to decouple it from the render loop, but this is no silver bullet, either.
 
Back
Top