On Mon, 21 Jan 2008, Curtis Olson wrote:
If you are talking about position lags and not frame rate lags, then I
believe the MP server builds in about a 10 second buffer delay to try to
prevent buffer starvation and show continuous motion on the client side.
Yes, we have such a buffer but it is implemented on the client side. The
servers only forward data packets as fast as they can. The communication
to and from the servers are done using UDP so that in itself should not
cause lag. If the amount of traffic exceeds the available capacity either
at the server's or the user's end dropped packets might lead to jerky
motion of MP aircraft.
Frame rate delays are typically caused by someone entering the MP system
requiring all the participant systems to load the corresponding 3d model.
Yes. Some aircraft are quite heavy - a 787 joining stalls my system for
some 10 - 15 seconds.
One thing I have noticed now when the number of pilots is larger than ever
is that during startup my FlightGear joins and leaves the MP network
repeatedly greatly prolonging the startup time (I suspect the MP models
get purged and reloaded each join/leave cycle). This is due to the MP
system starting to send data early and the extremely low frame rate
during initialization - the MP code probably looks for new packets once
per frame.
To make it bearable I delayed the MP joining some in multiplaymgr:
--- a/src/MultiPlayer/multiplaymgr.cxx
+++ b/src/MultiPlayer/multiplaymgr.cxx
@@ -310,6 +310,10 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData&
motionInfo)
return;
}
+ if (fgGetDouble("/sim/time/elapsed-sec") < 2.0) {
+ return;
+ }
+
T_PositionMsg PosMsg;
This is pretty ugly but made a huge difference on my system.
Note, though, it only reduces startup time - it doesn't do much when
connected except that by not having join/leave/join cycles joining
players are less tough on the rest of the participants.
Cheers,
Anders
diff --git a/src/MultiPlayer/multiplaymgr.cxx b/src/MultiPlayer/multiplaymgr.cxx
index f59b403..5505d07 100644
--- a/src/MultiPlayer/multiplaymgr.cxx
+++ b/src/MultiPlayer/multiplaymgr.cxx
@@ -310,6 +310,10 @@ FGMultiplayMgr::SendMyPosition(const FGExternalMotionData&
motionInfo)
return;
}
+ if (fgGetDouble("/sim/time/elapsed-sec") < 2.0) {
+ return;
+ }
+
T_PositionMsg PosMsg;
strncpy(PosMsg.Model, fgGetString("/sim/model/path"), MAX_MODEL_NAME_LEN);
PosMsg.Model[MAX_MODEL_NAME_LEN - 1] = '\0';
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel